aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorTino Calancha2018-06-03 23:28:30 +0900
committerTino Calancha2018-06-03 23:28:30 +0900
commit5fa73a7d98040f749f4cd45cfa40cf3c1c8cc2e3 (patch)
tree01511805dc80acff47aba83bb967b81daa229f6a /lisp/replace.el
parent031004e81b1507c4594ae253faaafcda31f253c8 (diff)
downloademacs-5fa73a7d98040f749f4cd45cfa40cf3c1c8cc2e3.tar.gz
emacs-5fa73a7d98040f749f4cd45cfa40cf3c1c8cc2e3.zip
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.el3
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."
2721 (replace-match-maybe-edit 2721 (replace-match-maybe-edit
2722 next-replacement nocasify literal noedit 2722 next-replacement nocasify literal noedit
2723 real-match-data backward) 2723 real-match-data backward)
2724 replaced t)) 2724 replaced t)
2725 (setq next-replacement-replaced next-replacement))
2725 (setq done t)) 2726 (setq done t))
2726 2727
2727 ((eq def 'delete-and-edit) 2728 ((eq def 'delete-and-edit)