diff options
author | Jim Blandy <jimb@redhat.com> | 1993-01-14 14:49:17 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-01-14 14:49:17 +0000 |
commit | 817d6535a925c4cc5494c0aa2e47b33de8919307 (patch) | |
tree | 10cb20a590e2829b5898e1d90aeb32d2e471930a /lisp/textmodes/page-ext.el | |
parent | faa3b11db68fc9894d8b69b4408b9543fc4b6ca3 (diff) | |
download | emacs-817d6535a925c4cc5494c0aa2e47b33de8919307.tar.gz |
* page-ext.el (next-page): Correctly handle negative page count.
Diffstat (limited to 'lisp/textmodes/page-ext.el')
-rw-r--r-- | lisp/textmodes/page-ext.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index a351dcb5e3d..847d0b674e2 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -341,7 +341,10 @@ With arg (prefix if interactive), move that many pages." nil (goto-char (point-max))) (setq count (1- count))) - (while (and (< count 0) (not (bobp))) + ;; If COUNT is negative, we want to go back -COUNT + 1 page boundaries. + ;; The first page boundary we reach is the top of the current page, + ;; which doesn't count. + (while (and (< count 1) (not (bobp))) (if (re-search-backward page-delimiter nil t) (goto-char (match-beginning 0)) (goto-char (point-min))) |