From 8183d254688f2f37404c0669e0a7636dd4c18c7e Mon Sep 17 00:00:00 2001 Message-Id: <8183d254688f2f37404c0669e0a7636dd4c18c7e.1624367239.git.info@protesilaos.com> From: Protesilaos Stavrou Date: Mon, 21 Jun 2021 23:11:35 +0300 Subject: [PATCH] Use named face for apropos-button-face * etc/NEWS: Document new face. * lisp/apropos.el (apropos-face): Define new face. (apropos-button-face): 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..1bf8801566 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-button-face'. +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..c6c86f6db0 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-button-face + '((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-button-face 'help-echo "mouse-2, RET: Display more help on this face" 'follow-link t 'action (lambda (button) -- 2.32.0