summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-09-11 03:40:14 +0000
committerGlenn Morris <rgm@gnu.org>2009-09-11 03:40:14 +0000
commita87b98ce47010b4eec8f6982592d111fc611f388 (patch)
treee89668955eb30fa9752733b3b103ff94551b45bf /lisp/help-fns.el
parent57c8e7b456f9cff91ec37261e2a73cf9f04388a8 (diff)
downloademacs-a87b98ce47010b4eec8f6982592d111fc611f388.tar.gz
(describe-function-1): Mention if a function has a compiler-macro.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index b9530d89be9..de60cd5fea2 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1,7 +1,7 @@
;;; help-fns.el --- Complex help functions
-;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001,
-;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002,
+;; 2003, 2004, 2005, 2006, 2007, 2008, 2009
;; Free Software Foundation, Inc.
;; Maintainer: FSF
@@ -450,6 +450,18 @@ suitable file is found, return nil."
(fill-region-as-paragraph pt2 (point))
(unless (looking-back "\n\n")
(terpri)))))
+ ;; Note that list* etc do not get this property until
+ ;; cl-hack-byte-compiler runs, after bytecomp is loaded.
+ (when (eq (get function 'byte-compile) 'cl-byte-compile-compiler-macro)
+ (princ "This function has a compiler macro")
+ (let ((lib (get function 'compiler-macro-file)))
+ (when (stringp lib)
+ (princ (format " in `%s'" lib))
+ (with-current-buffer standard-output
+ (save-excursion
+ (re-search-backward "`\\([^`']+\\)'" nil t)
+ (help-xref-button 1 'help-function-cmacro function lib)))))
+ (princ ".\n\n"))
(let* ((arglist (help-function-arglist def))
(doc (documentation function))
(usage (help-split-fundoc doc function)))