From: Juri Linkov <juri@jurta.org>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 4981@emacsbugs.donarmstrong.com
Subject: bug#4981: C-l during query-replace
Date: Mon, 30 Nov 2009 01:44:30 +0200 [thread overview]
Message-ID: <87fx7w7v6p.fsf@mail.jurta.org> (raw)
In-Reply-To: <873a49ad0f.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 20 Nov 2009 11:29:20 +0200")
> I guess there are many other places that need replacing with the new
> command (e.g. `gnus-recenter').
I fixed `gnus-recenter' in gnus-sum.el.
> But with the patch I proposed in
> http://thread.gmane.org/gmane.emacs.devel/110349/focus=115915
> the name `recenter-top-bottom' makes no sense anymore.
> Maybe we should rename it to something more suitable
> before replacing `recenter' calls with the new name everywhere?
Installed. Currently I have no opinion about renaming
`recenter-top-bottom' to something more reasonable.
>> C-l during query-replace should run `recenter-top-bottom', not
>> `recenter' for consistency with what C-l normally does nowadays.
I can't find a clean solution because in the case of query-replace,
`this-command' is always `query-replace'.
This patch kinda works (though it doesn't reset the cycling order),
but I don't like this.
Index: lisp/window.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/window.el,v
retrieving revision 1.190
diff -u -r1.190 window.el
--- lisp/window.el 29 Nov 2009 23:34:09 -0000 1.190
+++ lisp/window.el 29 Nov 2009 23:42:30 -0000
@@ -1654,7 +1654,8 @@
(arg (recenter arg)) ; Always respect ARG.
(t
(setq recenter-last-op
- (if (eq this-command last-command)
+ (if (or (eq this-command last-command)
+ (eq this-command 'query-replace))
(car (or (cdr (member recenter-last-op recenter-positions))
recenter-positions))
(car recenter-positions)))
Index: lisp/replace.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/replace.el,v
retrieving revision 1.287
diff -u -r1.287 replace.el
--- lisp/replace.el 12 Nov 2009 06:55:43 -0000 1.287
+++ lisp/replace.el 29 Nov 2009 23:43:28 -0000
@@ -1785,7 +1788,9 @@
((eq def 'skip)
(setq done t))
((eq def 'recenter)
- (recenter nil))
+ (recenter-top-bottom))
((eq def 'edit)
(let ((opos (point-marker)))
(setq real-match-data (replace-match-data
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2009-11-29 23:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87skbwt9xq.fsf@mail.jurta.org>
2009-11-20 0:16 ` bug#4981: C-l during query-replace Dan Nicolaescu
2009-11-20 9:29 ` Juri Linkov
2009-11-29 23:44 ` Juri Linkov [this message]
2009-11-30 1:28 ` Stefan Monnier
2009-11-30 6:29 ` Dan Nicolaescu
2009-11-30 11:12 ` Juanma Barranquero
2009-11-30 12:04 ` Juri Linkov
2009-11-30 14:13 ` Stefan Monnier
2009-11-30 16:07 ` Juri Linkov
2009-11-30 17:24 ` Drew Adams
2009-11-30 20:55 ` Stefan Monnier
2009-11-30 16:30 ` bug#4981: marked as done (C-l during query-replace) Emacs bug Tracking System
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=87fx7w7v6p.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=4981@emacsbugs.donarmstrong.com \
--cc=dann@ics.uci.edu \
/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.