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 #14 received at 70576 <at> debbugs.gnu.org (full text, mbox):
>> (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.
As a more complicated feature, usually :filter is added by developers for
specific functionality, it's not intended to be used by users in their normal
customization of keymaps, like users will configure hints.
> Of course a new wrapper macro could also be developed to ease this.
> Do you anticipate any specific issues?
Here is what I recommend to do to simplify the definition of hints for users.
Like there can be a list of enter and exit commands in 'defvar-keymap':
:repeat ‘(:enter (commands ...) :exit (commands ...))’
the same list could be used for hints:
:repeat ‘(:enter (commands ...) :exit (commands ...) :hints ((command . hint) ...))’
This should be easier to document and to understand by users than
a special syntax of cons for binding and the requirement to add :name.
This bug report was last modified 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.