[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g'
From: |
Juri Linkov |
Subject: |
Re: master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g' |
Date: |
Wed, 10 Mar 2021 21:13:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>> I don't know what notation to use here though. Maybe something like:
>>>
>>> \\[cmd] -> works as today
>>> \\[=C-h] -> just adds the formatting to the exact string
>>> \\[+cmd] -> adds both the key binding and its M-x form
>>>
>>> (This would of course break for symbols starting with = or +.)
>>
>> Maybe displaying both the keybinding and the command name should be
>> defined by a command symbol's property like 'advertised-binding'
>> defines the default keybinding to display:
>>
>> (put 'revert-buffer :advertised-binding "M-x revert-buffer or C-x x g")
>
> Good idea; it has the benefit that it would be more consistent. It
> would also be nice to add a corresponding `declare'-form.
>
> But we should be careful to make it to also respect local bindings, for
> example `revert-buffer' is bound to "g" in `special-mode-map'.
>
> I'm thinking out loud here, but perhaps in some cases we don't want
> consistency? Could it be different in some situations? Perhaps we
> could first review some examples, to see if consistency is indeed what
> always we want. If it always makes sense, then your proposal is a
> no-brainer.
>
> Do we have any other commands than `revert-buffer' that could be
> candidates for such a property? I'm asking because it might be useful
> to review them with consistency in mind too.
I don't know, maybe a special syntax like you proposed above is still needed.
Re: master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g', Dmitry Gutov, 2021/03/11