From 596235d623064f181755c7b19384b71de81a1139 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 6 Oct 1998 23:25:52 +0000 Subject: [PATCH] (perform-replace): Position point properly before and after the recursive edit of C-r. --- lisp/replace.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index e1e14c92faf..d50f0d6ee30 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -850,10 +850,13 @@ which will run faster and probably do exactly what you want." ((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 -- 2.39.2