Function: emerge-scroll-right
emerge-scroll-right is an interactive and byte-compiled function
defined in emerge.el.gz.
Signature
(emerge-scroll-right &optional ARG)
Documentation
Scroll right all three merge buffers, if they are in windows.
If an argument is given, that is how many columns are scrolled, else nearly
the width of the A and B windows. \C-u - alone as argument scrolls half the
width of the A and B windows.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/emerge.el.gz
(defun emerge-scroll-right (&optional arg)
"Scroll right all three merge buffers, if they are in windows.
If an argument is given, that is how many columns are scrolled, else nearly
the width of the A and B windows. \\`C-u -' alone as argument scrolls half the
width of the A and B windows."
(interactive "P")
(emerge-operate-on-windows
#'scroll-right
;; calculate argument to scroll-right
;; if there is an explicit argument
(if (and arg (not (equal arg '-)))
;; use it
(prefix-numeric-value arg)
;; if not, see if we can determine a default amount
;; (half the window width)
(let ((merge-window (get-buffer-window emerge-merge-buffer)))
(if (null merge-window)
;; no window, use nil
nil
(let ((default-amount
(- (/ (window-width merge-window) 2) 3)))
;; the window was found
(if arg
;; C-u as argument means half of default amount
(/ default-amount 2)
;; no argument means default amount
default-amount)))))))