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.

Interactively, giving this command a numerical prefix will scroll up by that many lines (and down by that many lines if the number is negative). Without a prefix, scroll up by a full screen. If given a \C-u - prefix, scroll a full page down instead.

If N 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. A negative N means scroll downward.

If N 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.

Interactively, giving this command a numerical prefix will scroll
up by that many lines (and down by that many lines if the number
is negative).  Without a prefix, scroll up by a full screen.
If given a \\`C-u -' prefix, scroll a full page down instead.

If N 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.
A negative N means scroll downward.

If N is the atom `-', scroll downward 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
	    (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)))))