From: Protesilaos Stavrou <info@protesilaos.com>
To: 64799@debbugs.gnu.org
Subject: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 11:19:23 +0300 [thread overview]
Message-ID: <87zg3nqbuc.fsf@protesilaos.com> (raw)
[-- 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
next reply other threads:[~2023-07-23 8:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-23 8:19 Protesilaos Stavrou [this message]
2023-07-23 13:41 ` bug#64799: [PATCH] Add 'project-prompt-key' face 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg3nqbuc.fsf@protesilaos.com \
--to=info@protesilaos.com \
--cc=64799@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).