*** New setf-able function to access and set image parameters is
provided: 'image-property'.
+---
+*** New commands 'image-scroll-left' and 'image-scroll-right'
+for 'image-mode' that complement 'image-scroll-up' and
+'image-scroll-down': they have the same prefix arg behavior and stop
+at image boundaries.
+
---
** The default 'Info-default-directory-list' no longer checks some obsolete
directory suffixes (gnu, gnu/lib, gnu/lib/emacs, emacs, lib, lib/emacs)
(max 0 (- win-height next-screen-context-lines)))))
(t (image-next-line (- (prefix-numeric-value n))))))
+(defun image-scroll-left (&optional n)
+ "Scroll image in current window leftward by N character widths.
+Stop if the right edge of the image is reached.
+If ARG is omitted or nil, scroll leftward by a near full screen.
+A near full screen is 2 columns less than a full screen.
+Negative ARG means scroll rightward.
+If ARG is the atom `-', scroll rightward 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-width (- (nth 2 edges) (nth 0 edges))))
+ (image-forward-hscroll
+ (max 0 (- win-width 2)))))
+ ((eq n '-)
+ (let* ((edges (window-inside-edges))
+ (win-width (- (nth 2 edges) (nth 0 edges))))
+ (image-forward-hscroll
+ (min 0 (- 2 win-width)))))
+ (t (image-forward-hscroll (prefix-numeric-value n)))))
+
+(defun image-scroll-right (&optional n)
+ "Scroll image in current window rightward by N character widths.
+Stop if the left edge of the image is reached.
+If ARG is omitted or nil, scroll downward by a near full screen.
+A near full screen is 2 less than a full screen.
+Negative ARG means scroll leftward.
+If ARG is the atom `-', scroll leftward 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-width (- (nth 2 edges) (nth 0 edges))))
+ (image-forward-hscroll
+ (min 0 (- 2 win-width)))))
+ ((eq n '-)
+ (let* ((edges (window-inside-edges))
+ (win-width (- (nth 2 edges) (nth 0 edges))))
+ (image-forward-hscroll
+ (max 0 (- win-width 2)))))
+ (t (image-forward-hscroll (- (prefix-numeric-value n))))))
+
(defun image-bol (arg)
"Scroll horizontally to the left edge of the image in the current window.
With argument ARG not nil or 1, move forward ARG - 1 lines first,
(define-key map [remap scroll-down] 'image-scroll-down)
(define-key map [remap scroll-up-command] 'image-scroll-up)
(define-key map [remap scroll-down-command] 'image-scroll-down)
+ (define-key map [remap scroll-left] 'image-scroll-left)
+ (define-key map [remap scroll-right] 'image-scroll-right)
(define-key map [remap move-beginning-of-line] 'image-bol)
(define-key map [remap move-end-of-line] 'image-eol)
(define-key map [remap beginning-of-buffer] 'image-bob)