emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp help-fns.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp help-fns.el
Date: Fri, 11 Sep 2009 03:40:14 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/09/11 03:40:14

Modified files:
        lisp           : help-fns.el 

Log message:
        (describe-function-1): Mention if a function has a compiler-macro.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/help-fns.el?cvsroot=emacs&r1=1.137&r2=1.138

Patches:
Index: help-fns.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/help-fns.el,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- help-fns.el 13 Aug 2009 15:59:38 -0000      1.137
+++ help-fns.el 11 Sep 2009 03:40:14 -0000      1.138
@@ -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 @@
            (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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]