Function: image-scroll-down
image-scroll-down is an interactive and byte-compiled function defined
in image-mode.el.gz.
Signature
(image-scroll-down &optional N)
Documentation
Scroll image in current window downward by N lines.
Stop if the top edge of the image is reached.
Interactively, giving this command a numerical prefix will scroll
down by that many lines (and up by that many lines if the number
is negative). Without a prefix, scroll down by a full screen.
If given a \C-u - prefix, scroll a full page up instead.
If N is omitted or nil, scroll downward by a near full screen.
A near full screen is next-screen-context-lines less than a full screen.
A negative N means scroll upward.
If N is the atom -, scroll upward by nearly full screen.
When calling from a program, supply as argument a number, nil, or -.
Probably introduced at or before Emacs version 26.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-scroll-down (&optional n)
"Scroll image in current window downward by N lines.
Stop if the top edge of the image is reached.
Interactively, giving this command a numerical prefix will scroll
down by that many lines (and up by that many lines if the number
is negative). Without a prefix, scroll down by a full screen.
If given a \\`C-u -' prefix, scroll a full page up instead.
If N is omitted or nil, scroll downward by a near full screen.
A near full screen is `next-screen-context-lines' less than a full screen.
A negative N means scroll upward.
If N is the atom `-', scroll upward by nearly full screen.
When calling from a program, supply as argument a number, nil, or `-'."
(interactive "P" image-mode)
(cond ((null n)
(let* ((edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges))))
(image-next-line
(min 0 (- next-screen-context-lines win-height)))))
((eq n '-)
(let* ((edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges))))
(image-next-line
(max 0 (- win-height next-screen-context-lines)))))
(t (image-next-line (- (prefix-numeric-value n))))))