GNU bug report logs - #20687
25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 28 May 2015 21:13:02 UTC

Severity: wishlist

Tags: fixed

Found in version 25.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 20687 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 20687 <at> debbugs.gnu.org
Subject: Re: bug#20687: 25.0.50;
 `perform-replace' should invoke a key that you have bound in
 `query-replace-map'
Date: Mon, 01 Jun 2015 23:53:05 +0300
> 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).

Could you please send an example of your custom keybindings in
`query-replace-map' that currently don't work.




This bug report was last modified 4 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.