aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-01-14 14:49:17 +0000
committerJim Blandy1993-01-14 14:49:17 +0000
commit817d6535a925c4cc5494c0aa2e47b33de8919307 (patch)
tree10cb20a590e2829b5898e1d90aeb32d2e471930a
parentfaa3b11db68fc9894d8b69b4408b9543fc4b6ca3 (diff)
downloademacs-817d6535a925c4cc5494c0aa2e47b33de8919307.tar.gz
emacs-817d6535a925c4cc5494c0aa2e47b33de8919307.zip
* page-ext.el (next-page): Correctly handle negative page count.
-rw-r--r--lisp/textmodes/page-ext.el5
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."
341 nil 341 nil
342 (goto-char (point-max))) 342 (goto-char (point-max)))
343 (setq count (1- count))) 343 (setq count (1- count)))
344 (while (and (< count 0) (not (bobp))) 344 ;; If COUNT is negative, we want to go back -COUNT + 1 page boundaries.
345 ;; The first page boundary we reach is the top of the current page,
346 ;; which doesn't count.
347 (while (and (< count 1) (not (bobp)))
345 (if (re-search-backward page-delimiter nil t) 348 (if (re-search-backward page-delimiter nil t)
346 (goto-char (match-beginning 0)) 349 (goto-char (match-beginning 0))
347 (goto-char (point-min))) 350 (goto-char (point-min)))