bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64799: [PATCH] Add 'project-prompt-key' face


From: Protesilaos Stavrou
Subject: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 26 Jul 2023 07:50:26 +0300

> From: Dmitry Gutov <dmitry@gutov.dev>
> Date: Tue, 25 Jul 2023 16:05:15 +0300

> [... 13 lines elided]

>> Alternatively, we could add a version/facep check and always prefer
>> `help-key-binding' if it is available, otherwise fall-back to the
>> current option.
>
> That works for me.

Me too!

>>>> Perhaps a user option for the whole 'format' would be better?
>>>
>>> We can add a user option. But while we could also apply 'face'
>>> property on that option's string value, that doesn't seem like a very
>>> user-friendly approach toward someone who will want to change the face
>>> used (it will require some Lisp knowledge from the user).
>>>
>>> But a user option to change how the prompt text is constructed -- why
>>> not. E.g. one defaulting to "[%s] %s".
>> 
>> Is there really such a wide range of options that users might be
>> interested in here?
>
> Protesilaos wanted to use a different format?

For my use, and Emacs 28+, I want this:

    (format "%s %s"
               (propertize (key-description key) 'face 'project-prompt-key)
               label)

The reason I mentioned the possibility of a user option is because
without the square brackets the bold face will not have the same effect
as the current design.  The square brackets help add structure and make
it easier to identify the keys.  The use of 'bold' without the square
brackets may make it more difficult for users to spot the keys.

-- 
Protesilaos Stavrou
https://protesilaos.com





reply via email to

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