Function: doc-view-scroll-up-or-next-page

doc-view-scroll-up-or-next-page is an interactive and byte-compiled function defined in doc-view.el.gz.

Signature

(doc-view-scroll-up-or-next-page &optional ARG)

Documentation

Scroll page up ARG lines if possible, else goto next page.

When doc-view-continuous is non-nil, scrolling upward at the bottom edge of the page moves to the next page. Otherwise, goto next page only on typing SPC (ARG is nil).

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/doc-view.el.gz
(defun doc-view-scroll-up-or-next-page (&optional arg)
  "Scroll page up ARG lines if possible, else goto next page.
When `doc-view-continuous' is non-nil, scrolling upward
at the bottom edge of the page moves to the next page.
Otherwise, goto next page only on typing SPC (ARG is nil)."
  (interactive "P")
  (if (or doc-view-continuous (null arg))
      (let ((hscroll (window-hscroll))
	    (cur-page (doc-view-current-page)))
	(when (= (window-vscroll nil t) (image-scroll-up arg))
	  (doc-view-next-page)
	  (when (/= cur-page (doc-view-current-page))
	    (image-bob)
	    (image-bol 1))
	  (set-window-hscroll (selected-window) hscroll)))
    (image-scroll-up arg)))