From: Tino Calancha <tino.calancha@gmail.com>
To: 31538@debbugs.gnu.org
Subject: bug#31538: 26.1; query-replace undo fails if user edits the replacement string
Date: Sun, 20 May 2018 21:39:26 +0900 [thread overview]
Message-ID: <87o9hawlfl.fsf@gmail.com> (raw)
In-Reply-To: <87r2m6wmod.fsf@gmail.com> (Tino Calancha's message of "Sun, 20 May 2018 21:12:34 +0900")
Tino Calancha <tino.calancha@gmail.com> writes:
> M-<
> M-% is RET foo RET SPC E bar RET U
> ;; Just drop 'foo' but keeps 'bar'.
Update the replacement string after the user has input
the new value.
--8<-----------------------------cut here---------------start------------->8---
commit 5655739cedb02946dd16071a64e51fcab08abf8b
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Sun May 20 21:32:55 2018 +0900
Fix Bug#31538
* lisp/replace.el (perform-replace): Update the replacement string
after the user edit it.
diff --git a/lisp/replace.el b/lisp/replace.el
index 3503b656d9..8605577066 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2801,7 +2801,8 @@ perform-replace
(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)
--8<-----------------------------cut here---------------end--------------->8---
next prev parent reply other threads:[~2018-05-20 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-20 12:12 bug#31538: 26.1; query-replace undo fails if user edits the replacement string Tino Calancha
2018-05-20 12:39 ` Tino Calancha [this message]
2018-05-23 9:46 ` Tino Calancha
2018-05-26 2:35 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o9hawlfl.fsf@gmail.com \
--to=tino.calancha@gmail.com \
--cc=31538@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.