all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64799: [PATCH] Add 'project-prompt-key' face
@ 2023-07-23  8:19 Protesilaos Stavrou
  2023-07-23 13:41 ` Philip Kaludercic
  0 siblings, 1 reply; 30+ messages in thread
From: Protesilaos Stavrou @ 2023-07-23  8:19 UTC (permalink / raw)
  To: 64799

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

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

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-project-prompt-key-face.patch --]
[-- Type: text/x-patch, Size: 1941 bytes --]

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
    "  "))
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-08-24 12:34 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-23  8:19 bug#64799: [PATCH] Add 'project-prompt-key' face Protesilaos Stavrou
2023-07-23 13:41 ` Philip Kaludercic
2023-07-23 13:49   ` Protesilaos Stavrou
2023-07-23 13:59     ` Philip Kaludercic
2023-07-24  5:53       ` Protesilaos Stavrou
2023-07-25  1:56         ` Dmitry Gutov
2023-07-25  6:39           ` Philip Kaludercic
2023-07-25 13:05             ` Dmitry Gutov
2023-07-26  4:50               ` Protesilaos Stavrou
2023-07-26 11:10                 ` Eli Zaretskii
2023-07-27  1:01                   ` Dmitry Gutov
2023-07-27  5:28                     ` Eli Zaretskii
2023-07-28  0:56                       ` Dmitry Gutov
2023-07-28  5:51                         ` Eli Zaretskii
2023-07-27  1:28                 ` Dmitry Gutov
2023-07-28  3:33                   ` Protesilaos Stavrou
2023-08-12  0:35                     ` Dmitry Gutov
2023-07-28  6:35                   ` Philip Kaludercic
2023-08-23 10:35                   ` Visuwesh
2023-08-23 12:18                     ` Philip Kaludercic
2023-08-23 12:44                       ` Dmitry Gutov
2023-08-23 14:13                         ` Visuwesh
2023-08-23 15:24                           ` Dmitry Gutov
2023-08-23 15:35                             ` Visuwesh
2023-08-23 15:37                               ` Dmitry Gutov
2023-08-23 15:45                                 ` Visuwesh
2023-08-23 16:40                                   ` Dmitry Gutov
2023-08-23 17:36                                     ` Visuwesh
2023-08-24 11:59                                     ` Mauro Aranda
2023-08-24 12:34                                       ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.