aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-09-11 03:39:48 +0000
committerGlenn Morris2009-09-11 03:39:48 +0000
commit57c8e7b456f9cff91ec37261e2a73cf9f04388a8 (patch)
tree48871de43e86ab6053651c7b24142a4af6eadda7
parentae2fd0421f69f60b6d9cf9ce6a7dd530f841cd7f (diff)
downloademacs-57c8e7b456f9cff91ec37261e2a73cf9f04388a8.tar.gz
emacs-57c8e7b456f9cff91ec37261e2a73cf9f04388a8.zip
(help-function-cmacro): New button.
-rw-r--r--lisp/help-mode.el16
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...).")
202 (message "Unable to find location in file")))) 202 (message "Unable to find location in file"))))
203 'help-echo (purecopy "mouse-2, RET: find function's definition")) 203 'help-echo (purecopy "mouse-2, RET: find function's definition"))
204 204
205(define-button-type 'help-function-cmacro
206 :supertype 'help-xref
207 'help-function (lambda (fun file)
208 (setq file (locate-library file t))
209 (if (and file (file-readable-p file))
210 (progn
211 (pop-to-buffer (find-file-noselect file))
212 (goto-char (point-min))
213 (if (re-search-forward
214 (format "^[ \t]*(define-compiler-macro[ \t]+%s"
215 (regexp-quote (symbol-name fun))) nil t)
216 (forward-line 0)
217 (message "Unable to find location in file")))
218 (message "Unable to find file")))
219 'help-echo (purecopy "mouse-2, RET: find function's compiler macro"))
220
205(define-button-type 'help-variable-def 221(define-button-type 'help-variable-def
206 :supertype 'help-xref 222 :supertype 'help-xref
207 'help-function (lambda (var &optional file) 223 'help-function (lambda (var &optional file)