From: Karl Heuer Date: Tue, 6 Oct 1998 23:25:52 +0000 (+0000) Subject: (perform-replace): Position point properly X-Git-Tag: emacs-20.4~1565 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=596235d623064f181755c7b19384b71de81a1139;p=emacs.git (perform-replace): Position point properly before and after the recursive edit of C-r. --- 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