summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorProtesilaos Stavrou <info@protesilaos.com>2021-02-24 17:18:26 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-02-24 17:18:26 +0100
commit7c48c83dabeabc807acf4b84d1a0fc6a2ee5ae87 (patch)
treef9ea71ca4a270cd1cd02973476f1e1514a3bd051 /lisp/emacs-lisp
parent4aa9db733730a6780c244fcaf6f51b73fd84777e (diff)
downloademacs-7c48c83dabeabc807acf4b84d1a0fc6a2ee5ae87.tar.gz
emacs-7c48c83dabeabc807acf4b84d1a0fc6a2ee5ae87.tar.bz2
emacs-7c48c83dabeabc807acf4b84d1a0fc6a2ee5ae87.zip
Use named faces in shortdoc
* shortdoc.el (shortdoc-heading): Define new face for headings. (shortdoc-display-group): Apply new heading face. (shortdoc--display-function): Use existing face for section text. * etc/NEWS: Document new face (bug#46748).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/shortdoc.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 39e69f5aab9..789d6325e9a 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -40,6 +40,11 @@
(t :height 0.1 :inverse-video t :extend t))
"Face used to separate sections.")
+(defface shortdoc-heading
+ '((t :inherit variable-pitch :height 1.3 :weight bold))
+ "Face used for a heading."
+ :version "28.1")
+
(defface shortdoc-section
'((t :inherit variable-pitch))
"Face used for a section.")
@@ -1107,7 +1112,7 @@ There can be any number of :example/:result elements."
(insert "\n"))
(insert (propertize
(concat (substitute-command-keys data) "\n\n")
- 'face '(variable-pitch (:height 1.3 :weight bold))
+ 'face 'shortdoc-heading
'shortdoc-section t)))
;; There may be functions not yet defined in the data.
((fboundp (car data))
@@ -1175,7 +1180,7 @@ function's documentation in the Info manual")))
(prin1 value (current-buffer)))
(insert "\n " single-arrow " "
(propertize "[it depends]"
- 'face 'variable-pitch)
+ 'face 'shortdoc-section)
"\n"))
(:no-value
(if (stringp value)