diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-09-16 13:15:10 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-09-16 13:15:10 +0000 |
commit | 8f38189e4f1856e006611cc8c83fd88fc788e86d (patch) | |
tree | 9c535b395e99b64f22167b56b8c036c624aa142e /lisp/textmodes/page.el | |
parent | 77564fa48cbd34439311e72e2fba903fb7aa31fd (diff) | |
download | emacs-8f38189e4f1856e006611cc8c83fd88fc788e86d.tar.gz |
(what-page): Make sure we don't inf-loop if
page-delimiter matches the empty string.
Diffstat (limited to 'lisp/textmodes/page.el')
-rw-r--r-- | lisp/textmodes/page.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index 79976459ff6..7f52cf56ff8 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el @@ -153,6 +153,8 @@ thus showing a page other than the one point was originally in." (opoint (point))) (goto-char (point-min)) (while (re-search-forward page-delimiter opoint t) + (if (= (match-beginning 0) (match-end 0)) + (forward-char 1)) (setq count (1+ count))) (message "Page %d, line %d" count |