unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49162: 28.0.50; [PATCH] Use named face for apropos-face-button
@ 2021-06-21 20:17 Protesilaos Stavrou
  2021-06-22 11:42 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Protesilaos Stavrou @ 2021-06-21 20:17 UTC (permalink / raw)
  To: 49162

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

Dear maintainers,

The attached patch defines a new face for the Apropos buffer which
applies to buttons that indicate faces.

Before the attributes were hardcoded and could thus not be edited by the
user/theme.

All the best,
Protesilaos

-- 
Protesilaos Stavrou
https://protesilaos.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-named-face-for-apropos-face-button.patch --]
[-- Type: text/x-patch, Size: 1933 bytes --]

From fed7e750cb8a6b0057c8c036c6113335f3ebeb44 Mon Sep 17 00:00:00 2001
Message-Id: <fed7e750cb8a6b0057c8c036c6113335f3ebeb44.1624306326.git.info@protesilaos.com>
From: Protesilaos Stavrou <info@protesilaos.com>
Date: Mon, 21 Jun 2021 23:11:35 +0300
Subject: [PATCH] Use named face for apropos-face-button

* etc/NEWS: Document new face.
* lisp/apropos.el (apropos-face): Define new face.
(apropos-face-button): Specify face instead of hardcoding attributes.
---
 etc/NEWS        | 3 +++
 lisp/apropos.el | 7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 3c7d5ca10b..4cbd87b917 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1606,6 +1606,9 @@ These new navigation commands are bound to 'n' and 'p' in
 *** New command 'apropos-function'.
 This works like 'C-u M-x apropos-command' but is more discoverable.
 
+*** New face 'apropos-face-button'.
+Applies to buttons that indicate a face.
+
 ** CC Mode
 
 *** Added support for Doxygen documentation style.
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 17665a725a..f24448599f 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -96,6 +96,11 @@ (defface apropos-property
   "Face for property name in Apropos output, or nil for none."
   :version "24.3")
 
+(defface apropos-face-button
+  '((t (:inherit (font-lock-variable-name-face button))))
+  "Face for buttons that indicate a face in Apropos."
+  :version "28.1")
+
 (defface apropos-function-button
   '((t (:inherit (font-lock-function-name-face button))))
   "Button face indicating a function, macro, or command in Apropos."
@@ -276,7 +281,7 @@ (define-button-type 'apropos-user-option
 (define-button-type 'apropos-face
   'apropos-label "Face"
   'apropos-short-label "F"
-  'face '(font-lock-variable-name-face button)
+  'face 'apropos-face-button
   'help-echo "mouse-2, RET: Display more help on this face"
   'follow-link t
   'action (lambda (button)
-- 
2.32.0


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

end of thread, other threads:[~2021-06-22 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 20:17 bug#49162: 28.0.50; [PATCH] Use named face for apropos-face-button Protesilaos Stavrou
2021-06-22 11:42 ` Eli Zaretskii
2021-06-22 12:02   ` martin rudalics
2021-06-22 12:11     ` Protesilaos Stavrou
2021-06-22 12:21       ` Andreas Schwab
2021-06-22 12:37       ` Eli Zaretskii
2021-06-22 13:09         ` Protesilaos Stavrou
2021-06-22 13:34           ` Lars Ingebrigtsen
2021-06-22 14:00         ` Andreas Schwab
2021-06-22 15:33           ` Eli Zaretskii
2021-06-22 15:44             ` Andreas Schwab
2021-06-22 15:54               ` Eli Zaretskii

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