Mercurial > emacs
comparison lisp/replace.el @ 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 | 043c6a4da2df |
children | 3ca22a873859 |
comparison
equal
deleted
inserted
replaced
23383:7af3fdca3189 | 23384:a194e59ab82c |
---|---|
848 ((eq def 'skip) | 848 ((eq def 'skip) |
849 (setq done t)) | 849 (setq done t)) |
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 |
860 ;; can match again just after this match. | 863 ;; can match again just after this match. |
861 (if (and regexp-flag nonempty-match) | 864 (if (and regexp-flag nonempty-match) |