Function: doc-view-next-line-or-next-page

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

Signature

(doc-view-next-line-or-next-page &optional ARG)

Documentation

Scroll upward by ARG lines if possible, else goto next page.

When doc-view-continuous is non-nil, scrolling a line upward at the bottom edge of the page moves to the next page.

Key Bindings

Source Code

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