emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 0023891e842: Support hints in the :repeat keyword of defvar-k


From: Juri Linkov
Subject: Re: master 0023891e842: Support hints in the :repeat keyword of defvar-keymap for repeat-mode
Date: Tue, 07 May 2024 09:27:44 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> The need to repeat the name of the command in order to specify its label
> ("hint") makes the keymap definition twice as long and prone to errors.
> For example, after adding "hints" to one of my keymaps I got:
> [...]
> I don't have a great idea for an alternative interface off the top of my
> head, but if there's a way to avoid this duplication I think it would be
> a significant improvement.

Unfortunately, duplication can be removed only at the cost of
complicating the definitions of bindings that would be more
hard to learn for users, and therefore will remain prone to errors.

> Lastly, it could be nice to make the appearance of the prompt more in
> line with the read-multiple-choice prompt, which is conceptually very
> similar.  Crucially, if the key is a character that occurs in the label,
> it's better, IMO, to highlight the first occurrence of that character in
> the label (as r-m-c does) than to prefix the label with that character.
> We can reuse rmc--add-key-description for that purpose, as follows:

Nice idea.  A small problem is that when hints are not used,
it inserts an extra space between the character and comma.
But this is so minor that you could push the patch
if you think it's not worth making code more complex
by using rmc only when hints are specified.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]