From dd4e0e557dc7da0cf25356b9b53f380231259c95 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 13 Feb 2001 20:08:37 +0000 Subject: [PATCH] (occur): Stop at end of buffer. --- lisp/ChangeLog | 8 ++++++-- lisp/replace.el | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d5fd52dc7..cf30661e53 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2001-02-13 Stefan Monnier + + * replace.el (occur): Stop at end of buffer. + 2001-02-13 Eli Zaretskii * international/mule-cmds.el (set-input-method): Another doc fix. @@ -1943,7 +1947,7 @@ 2000-12-11 Carsten Dominik * progmodes/idlwave.el: Updated to IDLWAVE version 4.7. Too many - changes to list them here. + changes to list them here. * progmodes/idlw-shell.el: Updated to IDLWAVE version 4.7. Too many changes to list them here. @@ -1986,7 +1990,7 @@ 2000-12-10 Carsten Dominik * textmodes/reftex.el (reftex-scanning-info-available-p): New - function + function (reftex-TeX-master-file): Check for `tex-main-file' early enough. * textmodes/reftex-global.el (reftex-create-tags-file): Fixed bug diff --git a/lisp/replace.el b/lisp/replace.el index 2a0735cfe5..469133db8d 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -623,7 +623,7 @@ the matching is case-sensitive." (goto-char (point-max))) (save-excursion ;; Find next match, but give up if prev match was at end of buffer. - (while (and (not (= prevpos (point-max))) + (while (and (not (eobp)) (re-search-forward regexp nil t)) (goto-char (match-beginning 0)) (beginning-of-line) -- 2.20.1