aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorKarl Heuer1998-10-06 23:25:52 +0000
committerKarl Heuer1998-10-06 23:25:52 +0000
commit596235d623064f181755c7b19384b71de81a1139 (patch)
tree6c53a4f8e1f7ed435dbb8666f788c429ead3f62e /lisp/replace.el
parentad014140fbbfb40d15b7087fa50cce6309e4e263 (diff)
downloademacs-596235d623064f181755c7b19384b71de81a1139.tar.gz
emacs-596235d623064f181755c7b19384b71de81a1139.zip
(perform-replace): Position point properly
before and after the recursive edit of C-r.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el11
1 files 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."
850 ((eq def 'recenter) 850 ((eq def 'recenter)
851 (recenter nil)) 851 (recenter nil))
852 ((eq def 'edit) 852 ((eq def 'edit)
853 (goto-char (match-beginning 0)) 853 (let ((opos (point-marker)))
854 (funcall search-function search-string limit t) 854 (goto-char (match-beginning 0))
855 (setq real-match-data (match-data)) 855 (save-excursion
856 (save-excursion (recursive-edit)) 856 (funcall search-function search-string limit t)
857 (setq real-match-data (match-data)))
858 (save-excursion (recursive-edit))
859 (goto-char opos))
857 (set-match-data real-match-data) 860 (set-match-data real-match-data)
858 ;; Before we make the replacement, 861 ;; Before we make the replacement,
859 ;; decide whether the search string 862 ;; decide whether the search string