From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs Subject: bug#64799: [PATCH] Add 'project-prompt-key' face Date: Sun, 23 Jul 2023 11:19:23 +0300 Message-ID: <87zg3nqbuc.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40477"; mail-complaints-to="usenet@ciao.gmane.io" To: 64799@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 23 10:20:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qNUKB-000AL4-8j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Jul 2023 10:20:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNUJw-000768-9I; Sun, 23 Jul 2023 04:20:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNUJu-00075n-KU for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:20:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNUJu-0005nM-Bg for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNUJu-0005eO-5m for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jul 2023 08:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169010038021682 (code B ref -1); Sun, 23 Jul 2023 08:20:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jul 2023 08:19:40 +0000 Original-Received: from localhost ([127.0.0.1]:37983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNUJX-0005de-Io for submit@debbugs.gnu.org; Sun, 23 Jul 2023 04:19:39 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:51376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNUJV-0005dD-Q5 for submit@debbugs.gnu.org; Sun, 23 Jul 2023 04:19:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNUJP-00074X-T5 for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:19:32 -0400 Original-Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNUJN-0005cH-SI for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:19:31 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 31FE540003 for ; Sun, 23 Jul 2023 08:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1690100365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=QOsLZfZwA0KTllVk/oo3qR05Kbg6DvsDMt/tuVKXFm0=; b=dB1AdXrdQA1NXiwa30CIZbro71ia4U60FbtqfgM/RufZi5+LfW++7CfVbKFFfYivsB5LGK MXuxdb4yKXsHhsaZKmhKNhQVoLe9Cw9G9JWJM7UKDykhmvXSAnZlFKIBTSnG2fgzAMvTKr V9uCgiQFnf/fAbDfMJ8UQCz05YW27hamm7sAA8Kki8JNXcj30vjgbgFN4LknHlTHi7+4V2 eKVMXrOlPov+FGXcWSjn3brwNgIgX7h5VDx85s2GAYh5oMEIqoyaQIRExWBxtYmNQ9Xm5C vDn9ykOV6yDO4CRECwB7ucGO7PROi5MOvb/1EyHJtZq4LlU5N6wQJ/eF0fJn1Q== X-GND-Sasl: public@protesilaos.com Received-SPF: none client-ip=2001:4b98:dc4:8::222; envelope-from=info@protesilaos.com; helo=relay2-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265876 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-project-prompt-key-face.patch >From fcef17068821bd05e281dc75452c807bbc27c8dd Mon Sep 17 00:00:00 2001 Message-ID: From: Protesilaos Stavrou 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 --=-=-=--