Function: cua-scroll-up
cua-scroll-up is an interactive and byte-compiled function defined in
cua-base.el.gz.
Signature
(cua-scroll-up &optional ARG)
Documentation
Scroll text of current window upward ARG lines; or near full screen if no ARG.
If window cannot be scrolled further, move cursor to bottom line instead.
A near full screen is next-screen-context-lines less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom -, scroll downward by nearly full screen.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/cua-base.el.gz
;; Scrolling commands which do not signal errors at top/bottom
;; of buffer at first key-press (instead moves to top/bottom
;; of buffer).
(defun cua-scroll-up (&optional arg)
"Scroll text of current window upward ARG lines; or near full screen if no ARG.
If window cannot be scrolled further, move cursor to bottom line instead.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom `-', scroll downward by nearly full screen."
(interactive "^P")
(cond
((eq arg '-) (cua-scroll-down nil))
((< (prefix-numeric-value arg) 0)
(cua-scroll-down (- (prefix-numeric-value arg))))
((eobp)
(scroll-up arg)) ; signal error
(t
(condition-case nil
(scroll-up arg)
(end-of-buffer (goto-char (point-max)))))))