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).
This commit is contained in:
parent
4aa9db7337
commit
7c48c83dab
2 changed files with 11 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue