(what-page): Make sure we don't inf-loop if
[bpt/emacs.git] / lisp / textmodes / page.el
index 7997645..7f52cf5 100644 (file)
@@ -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