aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorPaul Eggert1997-06-25 05:30:02 +0000
committerPaul Eggert1997-06-25 05:30:02 +0000
commit937ab68f833ac77bf7d78e2803dc6b79001703f8 (patch)
tree6ed83ab9a6a86db2e09c796ffd210208b11e8c4a /lisp/replace.el
parent743139f5def88df7d3f7d5e8e0a3c356be315860 (diff)
downloademacs-937ab68f833ac77bf7d78e2803dc6b79001703f8.tar.gz
emacs-937ab68f833ac77bf7d78e2803dc6b79001703f8.zip
(perform-replace): When matching lookahead, use markers rather than
integers, since a replacement may invalidate integers.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 2f3fb9a6fe6..f0dc0fc1cea 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -630,7 +630,7 @@ which will run faster and probably do exactly what you want."
630 (and nonempty-match 630 (and nonempty-match
631 (or (not regexp-flag) 631 (or (not regexp-flag)
632 (and (looking-at search-string) 632 (and (looking-at search-string)
633 (match-data t))))) 633 (match-data)))))
634 634
635 ;; If time for a change, advance to next replacement string. 635 ;; If time for a change, advance to next replacement string.
636 (if (and (listp replacements) 636 (if (and (listp replacements)
@@ -727,7 +727,7 @@ which will run faster and probably do exactly what you want."
727 ;; can match again just after this match. 727 ;; can match again just after this match.
728 (if (and regexp-flag nonempty-match) 728 (if (and regexp-flag nonempty-match)
729 (setq match-again (and (looking-at search-string) 729 (setq match-again (and (looking-at search-string)
730 (match-data t))))) 730 (match-data)))))
731 ((eq def 'delete-and-edit) 731 ((eq def 'delete-and-edit)
732 (delete-region (match-beginning 0) (match-end 0)) 732 (delete-region (match-beginning 0) (match-end 0))
733 (store-match-data 733 (store-match-data