1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Make describe-face also output the version information

* lisp/help-fns.el (describe-variable-custom-version-info): Allow
taking a type as an optional input, so this can be used for faces,
too (bug#30527).

* lisp/faces.el (describe-face): Use this to output the version
information.
This commit is contained in:
Lars Ingebrigtsen 2019-07-14 18:50:23 +02:00
parent ac57c50938
commit 783eca5715
2 changed files with 15 additions and 6 deletions

View file

@ -1416,6 +1416,8 @@ argument, prompt for a regular expression using `read-regexp'."
(dolist (face (face-list))
(copy-face face face frame disp-frame)))))
(declare-function describe-variable-custom-version-info "help-fns"
(variable &optional type))
(defun describe-face (face &optional frame)
"Display the properties of face FACE on FRAME.
@ -1428,6 +1430,7 @@ If FRAME is omitted or nil, use the selected frame."
(interactive (list (read-face-name "Describe face"
(or (face-at-point t) 'default)
t)))
(require 'help-fns)
(let* ((attrs '((:family . "Family")
(:foundry . "Foundry")
(:width . "Width")
@ -1524,7 +1527,12 @@ If FRAME is omitted or nil, use the selected frame."
(re-search-backward ": \\([^:]+\\)" nil t)
(help-xref-button 1 'help-face attr)))
(insert "\n")))))
(terpri)))))))
(terpri)
(let ((version-info (describe-variable-custom-version-info
f 'face)))
(when version-info
(insert version-info)
(terpri)))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;