GNU bug report logs - #64799
[PATCH] Add 'project-prompt-key' face

Previous Next

Package: emacs;

Reported by: Protesilaos Stavrou <info <at> protesilaos.com>

Date: Sun, 23 Jul 2023 08:20:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 64799 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 13:41:43 +0000
Protesilaos Stavrou <info <at> 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 <at> protesilaos.com>
> From: Protesilaos Stavrou <info <at> 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
>     "  "))




This bug report was last modified 1 year and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.