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: Philip Kaludercic
Subject: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 13:41:43 +0000

Protesilaos Stavrou <info@protesilaos.com> writes:

> Dear maintainers,
>
> I noticed that the project switching dispatch menu hardcodes its face to
> 'bold'.  Adding a new face here allows themes/users to customise that
> style (e.g. to inherit the 'help-key-binding' face).

Does this even need a separate face, or shouldn't `help-key-binding' be
reused directly?

> This is the least intrusive change, though I would personally also
> remove the square brackets from the format specifier.
>
> What do you think?
>
> All the best,
> Protesilaos (or simply "Prot")
>
> -- 
> Protesilaos Stavrou
> https://protesilaos.com
>
>>From fcef17068821bd05e281dc75452c807bbc27c8dd Mon Sep 17 00:00:00 2001
> Message-ID: 
> <fcef17068821bd05e281dc75452c807bbc27c8dd.1690099845.git.info@protesilaos.com>
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Sun, 23 Jul 2023 10:55:37 +0300
> Subject: [PATCH] Add 'project-prompt-key' face
>
> * etc/NEWS: Announce the face.
> * lisp/progmodes/project.el (project-prompt-key): Define the face.
> (project--keymap-prompt): Use the face.
> ---
>  etc/NEWS                  | 4 ++++
>  lisp/progmodes/project.el | 5 ++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index 5883b4df2a7..70d0bf18f50 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -82,6 +82,10 @@ This allows the user to customize the prompt that is 
> appended by
>  This is used for displaying the time and date components of
>  'display-time-mode'.
>  
> +---
> +** New face 'project-prompt-key'.
> +This is used in the Project switch commands prompt.
> +
>  ---
>  ** New icon images for general use.
>  Several symbolic icons are added to "etc/images/symbols", including
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index 03ed966cc45..c2deec7c38d 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1821,6 +1821,9 @@ (defcustom project-switch-use-entire-map nil
>    :group 'project
>    :version "28.1")
>  
> +(defface project-prompt-key '((t :inherit bold))
> +  "Face for keys in the Project switch commands prompt.")
> +
>  (defun project--keymap-prompt ()
>    "Return a prompt for the project switching dispatch menu."
>    (mapconcat
> @@ -1834,7 +1837,7 @@ (defun project--keymap-prompt ()
>                      (vector key)
>                    (where-is-internal cmd (list project-prefix-map) t))))
>         (format "[%s] %s"
> -               (propertize (key-description key) 'face 'bold)
> +               (propertize (key-description key) 'face 'project-prompt-key)
>                 label)))
>     project-switch-commands
>     "  "))





reply via email to

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