Mercurial > emacs
changeset 76540:2f2e0b6d33c0
(reb-update-overlays): Do not mark zero-width regexps as invalid
but rather at least count them correctly.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 18 Mar 2007 14:29:44 +0000 |
parents | e182631d2713 |
children | 88d074903f48 |
files | lisp/emacs-lisp/re-builder.el |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/re-builder.el Sun Mar 18 11:41:42 2007 +0000 +++ b/lisp/emacs-lisp/re-builder.el Sun Mar 18 14:29:44 2007 +0000 @@ -639,11 +639,13 @@ (set-buffer reb-target-buffer) (reb-delete-overlays) (goto-char (point-min)) - (while (and (re-search-forward re (point-max) t) + (while (and (not (eobp)) + (re-search-forward re (point-max) t) (or (not reb-auto-match-limit) (< matches reb-auto-match-limit))) (if (= 0 (length (match-string 0))) - (error "Empty regular expression!")) + (unless (eobp) + (forward-char 1))) (let ((i 0) suffix max-suffix) (setq matches (1+ matches))