Use named face for apropos-button

* etc/NEWS: Document new face.
* lisp/apropos.el (apropos-button): Define new face.
(apropos-face): Specify face instead of hardcoding
attributes (bug#49162).
This commit is contained in:
Protesilaos Stavrou 2021-06-22 15:33:26 +02:00 committed by Lars Ingebrigtsen
parent b16b4d730e
commit e4b9e1c66c
2 changed files with 9 additions and 1 deletions

View file

@ -1612,6 +1612,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'.
Applies to buttons that indicate a face.
** CC Mode
*** Added support for Doxygen documentation style.

View file

@ -96,6 +96,11 @@ include key-binding information in its output."
"Face for property name in Apropos output, or nil for none."
:version "24.3")
(defface apropos-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 @@ before `apropos-mode' makes it buffer-local.")
(define-button-type 'apropos-face
'apropos-label "Face"
'apropos-short-label "F"
'face '(font-lock-variable-name-face button)
'face 'apropos-button
'help-echo "mouse-2, RET: Display more help on this face"
'follow-link t
'action (lambda (button)