emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Consistent face for keys in *Help* and `substitute-comm


From: Stefan Kangas
Subject: RE: [External] : Consistent face for keys in *Help* and `substitute-command-keys'
Date: Tue, 23 Feb 2021 22:44:49 -0600

Drew Adams <drew.adams@oracle.com> writes:

> I think you already knew that I've been doing this
> in help-fns+.el for over a decade.  I've offered
> the code before, and we've discussed it.  It uses
> `help-substitute-command-keys':

I admit that I have never used any of your libraries.

But I have seen Bug#8951 and the code you presented there.

> That is, keys are linked to their commands.
> So their face is the face Emacs uses for links.
>
> I think that's the right (better) approach.

I'm not convinced of that.  There will be many links all over the place,
sometimes many links to the same place.  It risks cluttering the help
screen too much, whereas the effect you see with my patch is more
subtle.  I also don't know of too many examples where links will be
highly useful.

Still, I'm not writing off the idea completely, I just don't currently
see how to balance the drawbacks.

>> Having looked over the 430 matches for s-c-k in our tree, I couldn't
>> find any location where we would not benefit from this consistency.  On
>> the contrary, it would be quite nice to see that the same face used in
>> *Help* also shows up in messages such as these:
>>
>>     "Use \\[shadow-copy-files] to update shadows."
>>     "Press \\[wdired-finish-edit] when finished or \\[wdired-abort-
>> changes] ..."
>>     "\\[scroll-up] scrolls up, \\[scroll-down] scrolls down, ..."
>>
>> Please find attached a patch.  It is a little bit rough around the
>> edges still so needs polishing up and documentation.  For testing,
>> try e.g. `C-h C-h', `C-h C-h', `C-h C-c', or even `C-s C-h ?'.
>
> That's already been solved.

Care to elaborate?  AFAICT, messages do not currently display
keybindings in a different face.

> You can start with the code in help-fns+.el.
> Or you can start from scratch.  But DTRT.

The work is mostly to identify the places where we output keys and
ensure the strings get the correct face properties applied to them.
Therefore, it is unfortunately not much help to start from anything that
is not the Emacs source code or a patch to the Emacs source code.



reply via email to

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