diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2018-06-03 23:28:30 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2018-06-03 23:28:30 +0900 |
commit | 5fa73a7d98040f749f4cd45cfa40cf3c1c8cc2e3 (patch) | |
tree | 01511805dc80acff47aba83bb967b81daa229f6a /lisp/replace.el | |
parent | 031004e81b1507c4594ae253faaafcda31f253c8 (diff) | |
download | emacs-5fa73a7d98040f749f4cd45cfa40cf3c1c8cc2e3.tar.gz |
query-replace undo: Handle when user edits the replacement string
* lisp/replace.el (perform-replace): Update the replacement string
after the user edit it (Fix Bug#31538).
* test/lisp/replace-tests.el (query-replace-undo-bug31538): New test.
Backport: (cherry picked from commits
ea133e04f49afa7928e49a3ac4a85b47f6f13f01
and
7dcfdf5b14325ae7996f272f14c72810d7c84944)
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 88da7e26cb0..940bf566509 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2721,7 +2721,8 @@ It must return a string." (replace-match-maybe-edit next-replacement nocasify literal noedit real-match-data backward) - replaced t)) + replaced t) + (setq next-replacement-replaced next-replacement)) (setq done t)) ((eq def 'delete-and-edit) |