diff lisp/replace.el @ 21294:e010f1191668

(perform-replace): Before recursive edit, get the match data as markers, and set real-match-data.
author Richard M. Stallman <rms@gnu.org>
date Thu, 26 Mar 1998 06:31:26 +0000
parents 59f75e1f5541
children 9861518505cb
line wrap: on
line diff
--- a/lisp/replace.el	Thu Mar 26 04:28:37 1998 +0000
+++ b/lisp/replace.el	Thu Mar 26 06:31:26 1998 +0000
@@ -846,9 +846,11 @@
 		      ((eq def 'recenter)
 		       (recenter nil))
 		      ((eq def 'edit)
-		       (set-match-data
-			(prog1 (match-data)
-			  (save-excursion (recursive-edit))))
+		       (goto-char (match-beginning 0))
+		       (funcall search-function search-string limit t)
+		       (setq real-match-data (match-data))
+		       (save-excursion (recursive-edit))
+		       (set-match-data real-match-data)
 		       ;; Before we make the replacement,
 		       ;; decide whether the search string
 		       ;; can match again just after this match.