emacs-devel
[Top][All Lists]
Advanced

[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: Stefan Kangas
Subject: Re: master a6a5d6a: Move 'revert-buffer' global binding to 'C-x g g'
Date: Tue, 9 Mar 2021 20:56:20 -0800

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>     Usually, you should type ā€˜nā€™ and then ā€˜C-x x gā€™,
>>     to get the latest version of the file, then make the change again.
>>
>> The "C-x x g" part used to be "M-x revert-buffer" and therefore more
>> self-explanatory.  (This is due to subsitute-command-keys replacing the
>> "\\[revert-buffer]" with the new keybinding.)
>
> I'm tempted to say that in many cases it would make sense to show both.
> Maybe doing it for \\[...] would be too disruptive, but maybe we should
> introduce a new form which will gets expanded to both the key binding and
> the name of the command.

Sure, why not?

I also see a need for a form that expands to the exact text specified
but adds the `help-key-binding' face (to be used e.g. when there is no
keymap to refer to, as in userlock.el, or when we want to display RET as
C-m as in `help-for-help').

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 +.)



reply via email to

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