# HG changeset patch # User Richard M. Stallman # Date 1116214292 0 # Node ID c051115aeb95272c3162fb5c3ef3eb12c62f8f14 # Parent 3eeae124dcab789e3dd53a5ee2f4d30f72788353 (help-face-def): New button type. diff -r 3eeae124dcab -r c051115aeb95 lisp/help-mode.el --- a/lisp/help-mode.el Mon May 16 03:31:11 2005 +0000 +++ b/lisp/help-mode.el Mon May 16 03:31:32 2005 +0000 @@ -169,6 +169,18 @@ (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 ()