Mercurial > emacs
changeset 1770:29bcc2c88773
* page-ext.el (next-page): Correctly handle negative page count.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Thu, 14 Jan 1993 14:49:17 +0000 |
parents | c77a852fda5f |
children | 3f0f18d4eb8c |
files | lisp/textmodes/page-ext.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/page-ext.el Thu Jan 14 14:48:57 1993 +0000 +++ b/lisp/textmodes/page-ext.el Thu Jan 14 14:49:17 1993 +0000 @@ -341,7 +341,10 @@ 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)))