summaryrefslogtreecommitdiff
path: root/lisp/help-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r--lisp/help-mode.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 8b0284089fc..d94f03200dc 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -169,6 +169,18 @@ The format is (FUNCTION ARGS...).")
(goto-char (cdr location))))
'help-echo (purecopy"mouse-2, RET: find variable's definition"))
+(define-button-type 'help-face-def
+ :supertype 'help-xref
+ 'help-function (lambda (fun file)
+ (require 'find-func)
+ ;; Don't use find-function-noselect because it follows
+ ;; aliases (which fails for built-in functions).
+ (let ((location
+ (find-function-search-for-symbol fun 'defface file)))
+ (pop-to-buffer (car location))
+ (goto-char (cdr location))))
+ 'help-echo (purecopy "mouse-2, RET: find face's definition"))
+
;;;###autoload
(defun help-mode ()