From: Richard M. Stallman Date: Mon, 16 May 2005 03:31:32 +0000 (+0000) Subject: (help-face-def): New button type. X-Git-Tag: ttn-vms-21-2-B4~257 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=12b42b71d4ef50cfd4aec56b62cfc25954b3c99d;p=emacs.git (help-face-def): New button type. --- 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 ()