diff options
author | Glenn Morris <rgm@gnu.org> | 2009-09-11 03:39:48 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-09-11 03:39:48 +0000 |
commit | 57c8e7b456f9cff91ec37261e2a73cf9f04388a8 (patch) | |
tree | 48871de43e86ab6053651c7b24142a4af6eadda7 /lisp/help-mode.el | |
parent | ae2fd0421f69f60b6d9cf9ce6a7dd530f841cd7f (diff) | |
download | emacs-57c8e7b456f9cff91ec37261e2a73cf9f04388a8.tar.gz |
(help-function-cmacro): New button.
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r-- | lisp/help-mode.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 91fb4f99257..7c032b81cf2 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -202,6 +202,22 @@ The format is (FUNCTION ARGS...).") (message "Unable to find location in file")))) 'help-echo (purecopy "mouse-2, RET: find function's definition")) +(define-button-type 'help-function-cmacro + :supertype 'help-xref + 'help-function (lambda (fun file) + (setq file (locate-library file t)) + (if (and file (file-readable-p file)) + (progn + (pop-to-buffer (find-file-noselect file)) + (goto-char (point-min)) + (if (re-search-forward + (format "^[ \t]*(define-compiler-macro[ \t]+%s" + (regexp-quote (symbol-name fun))) nil t) + (forward-line 0) + (message "Unable to find location in file"))) + (message "Unable to find file"))) + 'help-echo (purecopy "mouse-2, RET: find function's compiler macro")) + (define-button-type 'help-variable-def :supertype 'help-xref 'help-function (lambda (var &optional file) |