changeset 23384:a194e59ab82c

(perform-replace): Position point properly before and after the recursive edit of C-r.
author Karl Heuer <kwzh@gnu.org>
date Tue, 06 Oct 1998 23:25:52 +0000
parents 7af3fdca3189
children 95773b2746b4
files lisp/replace.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Tue Oct 06 23:24:11 1998 +0000
+++ b/lisp/replace.el	Tue Oct 06 23:25:52 1998 +0000
@@ -850,10 +850,13 @@
 		      ((eq def 'recenter)
 		       (recenter nil))
 		      ((eq def 'edit)
-		       (goto-char (match-beginning 0))
-		       (funcall search-function search-string limit t)
-		       (setq real-match-data (match-data))
-		       (save-excursion (recursive-edit))
+		       (let ((opos (point-marker)))
+			 (goto-char (match-beginning 0))
+			 (save-excursion
+			   (funcall search-function search-string limit t)
+			   (setq real-match-data (match-data)))
+			 (save-excursion (recursive-edit))
+			 (goto-char opos))
 		       (set-match-data real-match-data)
 		       ;; Before we make the replacement,
 		       ;; decide whether the search string