Function: image-next-line
image-next-line is an interactive and byte-compiled function defined
in image-mode.el.gz.
Signature
(image-next-line N)
Documentation
Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-next-line (n)
"Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached."
(interactive "p" image-mode)
;; Convert N to pixels.
(setq n (* n (frame-char-height)))
(cond ((= n 0) nil)
((< n 0)
(image-set-window-vscroll (max 0 (+ (window-vscroll nil t) n))))
(t
(let* ((image (image-get-display-property))
(edges (window-edges nil t t))
(win-height (- (nth 3 edges) (nth 1 edges)))
(img-height (ceiling (cdr (image-display-size image t)))))
(image-set-window-vscroll (min (max 0 (- img-height win-height))
(+ n (window-vscroll nil t))))))))