all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map'
@ 2015-05-28 21:12 Drew Adams
  2015-06-01 20:53 ` Juri Linkov
  2015-06-02 13:08 ` Kaushal
  0 siblings, 2 replies; 12+ messages in thread
From: Drew Adams @ 2015-05-28 21:12 UTC (permalink / raw)
  To: 20687

You can bind any key you like in `query-replace-map'.  But
`perform-replace', in effect, hard-codes the keys that it recognizes.

This is not necessary.  You shbould be able to bind a new key in that
map to some command, and have `perform-replace' invoke that command.

All that's required for this is to add another `cond' clause, just
before the final `t' (otherwise) clause, to do this:

(cond
  ...
  (def (call-interactively def)) ; User-defined key - invoke it.
  (t
   ;; Note: we do not need to treat `exit-prefix'
   ;; specially here, since we reread
   ;; any unrecognized character.
   ...))

It seems silly for the code to be written like it is.  We already look
up the key you press in the q-r keymap.  If we find a DEF that is not
one of those predefined by Emacs then we ignore it?  That makes no sense
(to me).



In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-17 18:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 21:12 bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Drew Adams
2015-06-01 20:53 ` Juri Linkov
2015-06-01 21:11   ` Drew Adams
2015-06-02 22:01     ` Juri Linkov
2015-06-02 22:12       ` Drew Adams
2020-09-17 18:11       ` Lars Ingebrigtsen
2015-06-02 13:08 ` Kaushal
2015-06-02 22:02   ` Juri Linkov
2015-06-02 22:50     ` Drew Adams
2015-06-03  3:35       ` Kaushal
2015-06-03  4:39         ` Drew Adams
2015-06-03  5:10           ` Kaushal

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.