]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-face-def): New button type.
authorRichard M. Stallman <rms@gnu.org>
Mon, 16 May 2005 03:31:32 +0000 (03:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 16 May 2005 03:31:32 +0000 (03:31 +0000)
lisp/help-mode.el

index 8b0284089fc3d1651c7801e4c68b7dce31a01fa4..d94f03200dc25e51bb0466ba8ebd10fe6c8a71ba 100644 (file)
@@ -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"))
+
 \f
 ;;;###autoload
 (defun help-mode ()