From 12b42b71d4ef50cfd4aec56b62cfc25954b3c99d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 16 May 2005 03:31:32 +0000 Subject: [PATCH] (help-face-def): New button type. --- lisp/help-mode.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 () -- 2.39.2