Function: image-forward-hscroll
image-forward-hscroll is an interactive and byte-compiled function
defined in image-mode.el.gz.
Signature
(image-forward-hscroll &optional N)
Documentation
Scroll image in current window to the left by N character widths.
Stop if the right edge of the image is reached.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-forward-hscroll (&optional n)
"Scroll image in current window to the left by N character widths.
Stop if the right edge of the image is reached."
(interactive "p")
(cond ((= n 0) nil)
((< n 0)
(image-set-window-hscroll (max 0 (+ (window-hscroll) n))))
(t
(let* ((image (image-get-display-property))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-display-size image)))))
(image-set-window-hscroll (min (max 0 (- img-width win-width))
(+ n (window-hscroll))))))))