# HG changeset patch # User Stefan Monnier # Date 1253106910 0 # Node ID 92f324954126b05dae462f7efab03201a3290fd8 # Parent 2e1ecbf638ee87e9fd08730f9b7fffd806d8a5e6 (what-page): Make sure we don't inf-loop if page-delimiter matches the empty string. diff -r 2e1ecbf638ee -r 92f324954126 lisp/ChangeLog --- a/lisp/ChangeLog Wed Sep 16 03:13:55 2009 +0000 +++ b/lisp/ChangeLog Wed Sep 16 13:15:10 2009 +0000 @@ -1,3 +1,8 @@ +2009-09-16 Stefan Monnier + + * textmodes/page.el (what-page): Make sure we don't inf-loop if + page-delimiter matches the empty string. + 2009-09-16 Glenn Morris * emacs-lisp/bytecomp.el (byte-compile-not-obsolete-vars): Rename from diff -r 2e1ecbf638ee -r 92f324954126 lisp/textmodes/page.el --- a/lisp/textmodes/page.el Wed Sep 16 03:13:55 2009 +0000 +++ b/lisp/textmodes/page.el Wed Sep 16 13:15:10 2009 +0000 @@ -153,6 +153,8 @@ (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