diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-14 17:01:58 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-14 17:02:05 +0200 |
commit | a7aae1473c1aed7758b550a23cda61ee17668e23 (patch) | |
tree | a105963a091ce12684a7eaa60d38261b855ae54a /lisp/faces.el | |
parent | 8ff09154a29a1151afb2902267ca35f89ebda73c (diff) | |
download | emacs-a7aae1473c1aed7758b550a23cda61ee17668e23.tar.gz emacs-a7aae1473c1aed7758b550a23cda61ee17668e23.tar.bz2 emacs-a7aae1473c1aed7758b550a23cda61ee17668e23.zip |
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.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r-- | lisp/faces.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index f9e8c6c58b8..c3ef7dcb0f7 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -25,6 +25,8 @@ ;;; Code: +(require 'subr-x) + (defcustom term-file-prefix (purecopy "term/") "If non-nil, Emacs startup performs terminal-specific initialization. It does this by: (load (concat term-file-prefix (getenv \"TERM\"))) @@ -1416,6 +1418,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 +1432,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 +1529,11 @@ 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) + (when-let ((version-info (describe-variable-custom-version-info + f 'face))) + (insert version-info)) + (terpri))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |