GNU bug report logs -
#70576
[PATCH] `repeat-echo-message-string': support repeat keymap "hints"
Previous Next
Reported by: JD Smith <jdtsmith <at> gmail.com>
Date: Thu, 25 Apr 2024 22:33:05 UTC
Severity: normal
Tags: fixed, moreinfo, patch
Found in version 30.0.5
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 70576 <at> debbugs.gnu.org (full text, mbox):
> On Apr 26, 2024, at 2:06 AM, Juri Linkov <juri <at> linkov.net> wrote:
>
> I feel uneasy about reusing the form (STRING . DEFN)
> that has another meaning:
>
> a cons (STRING . DEFN), meaning that DEFN is the definition
> (DEFN should be a valid definition in its own right) and
> STRING is the menu item name (which is used only if the containing
> keymap has been created with a menu name, see make-keymap),
>
> Can the same instead be achieved by using symbol properties?
> For example:
> (defvar-keymap expreg-repeat-map
> :doc "Repeat map for `expreg' actions."
> :repeat t
> "\\" 'expreg-expand
> "|" 'expreg-contract)
>
> (put 'expreg-expand 'repeat-hint "expand")
> (put 'expreg-contract 'repeat-hint "contract")
Thanks for taking a look. A property on the command could work (and then you need no :name). It would be somewhat harder to maintain the structure for long keymaps, e.g. if a command changes. I do note that menu-item with :filter is commonly recommended for non-menu dynamic bindings, so there is some precedent of reusing menu functionality in other contexts. Of course a new wrapper macro could also be developed to ease this. Do you anticipate any specific issues?
This bug report was last modified 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.