Function: image-scroll-up
image-scroll-up is an interactive and byte-compiled function defined
in image-mode.el.gz.
Signature
(image-scroll-up &optional N)
Documentation
Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached.
If ARG is omitted or nil, scroll upward by a near full screen.
A near full screen is next-screen-context-lines less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom -, scroll downward 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-up (&optional n)
"Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached.
If ARG is omitted or nil, scroll upward by a near full screen.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom `-', scroll downward by nearly full screen.
When calling from a program, supply as argument a number, nil, or `-'."
(interactive "P")
(cond ((null 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)))))
((eq 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)))))
(t (image-next-line (prefix-numeric-value n)))))