diff options
| -rw-r--r-- | lisp/replace.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 9a2da5fc2e6..ebe3088c04e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -846,9 +846,11 @@ which will run faster and probably do exactly what you want." | |||
| 846 | ((eq def 'recenter) | 846 | ((eq def 'recenter) |
| 847 | (recenter nil)) | 847 | (recenter nil)) |
| 848 | ((eq def 'edit) | 848 | ((eq def 'edit) |
| 849 | (set-match-data | 849 | (goto-char (match-beginning 0)) |
| 850 | (prog1 (match-data) | 850 | (funcall search-function search-string limit t) |
| 851 | (save-excursion (recursive-edit)))) | 851 | (setq real-match-data (match-data)) |
| 852 | (save-excursion (recursive-edit)) | ||
| 853 | (set-match-data real-match-data) | ||
| 852 | ;; Before we make the replacement, | 854 | ;; Before we make the replacement, |
| 853 | ;; decide whether the search string | 855 | ;; decide whether the search string |
| 854 | ;; can match again just after this match. | 856 | ;; can match again just after this match. |