diff options
Diffstat (limited to 'lisp/view.el')
-rw-r--r-- | lisp/view.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/view.el b/lisp/view.el index 5e6f3e2caa9..deda061cd39 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -381,9 +381,6 @@ own View-like bindings." ;; bindings instead of using the \\[] construction. The reason for this ;; is that most commands have more than one key binding. "Toggle View mode, a minor mode for viewing text but not editing it. -With a prefix argument ARG, enable View mode if ARG is positive, -and disable it otherwise. If called from Lisp, enable View mode -if ARG is omitted or nil. When View mode is enabled, commands that do not change the buffer contents are available as usual. Kill commands save text but @@ -746,18 +743,19 @@ invocations return to earlier marks." (setq backward (not backward) lines (- lines))) (when (and maxdefault lines (> lines (view-window-size))) (setq lines nil)) - (cond (backward (scroll-down lines)) + (cond (backward (scroll-down-command lines)) ((view-really-at-end) (if view-scroll-auto-exit (View-quit) (ding) (view-end-message))) - (t (scroll-up lines) + (t (scroll-up-command lines) (if (view-really-at-end) (view-end-message))))) (defun view-really-at-end () ;; Return true if buffer end visible. Maybe revert buffer and test. - (and (pos-visible-in-window-p (point-max)) + (and (or (null scroll-error-top-bottom) (eobp)) + (pos-visible-in-window-p (point-max)) (let ((buf (current-buffer)) (bufname (buffer-name)) (file (buffer-file-name))) @@ -960,7 +958,7 @@ for highlighting the match that is found." (t (error "No previous View-mode search"))) (save-excursion (if end (goto-char (if (< times 0) (point-max) (point-min))) - (move-to-window-line (if (< times 0) 0 -1))) + (forward-line (if (< times 0) -1 1))) (if (if no (view-search-no-match-lines times regexp) (re-search-forward regexp nil t times)) (setq where (point)))) |