]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fdocumentation): Check for and handle an advised function.
authorRichard M. Stallman <rms@gnu.org>
Fri, 19 Oct 2007 17:23:38 +0000 (17:23 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 19 Oct 2007 17:23:38 +0000 (17:23 +0000)
src/ChangeLog
src/doc.c

index 11ba13484121fc944320750648c69f82be403ea0..a74c33a0e26e498509e41a3c77fc9778743838d9 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-19  Richard Stallman  <rms@gnu.org>
+
+       * doc.c (Fdocumentation): Check for and handle an advised function.
+
 2007-10-19  Juanma Barranquero  <lekktu@gmail.com>
 
        * process.c (Fset_process_filter): Doc fix.
index 4cd43f0ae90662289293e2f2a26ee97625692b01..53f645c6e5301dd55f56606df7d77d9330e54db4 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -434,6 +434,18 @@ string is passed through `substitute-command-keys'.  */)
            doc = tem;
          else
            return Qnil;
+
+         /* Check for an advised function.  Its doc string
+            has an `ad-advice-info' text property.  */
+         if (STRINGP (doc))
+           {
+             Lisp_Object innerfunc;
+             innerfunc = Fget_text_property (make_number (0),
+                                             intern ("ad-advice-info"),
+                                             doc);
+             if (! NILP (innerfunc))
+               doc = call1 (intern ("ad-make-advised-docstring"), innerfunc);
+           }
        }
       else if (EQ (funcar, Qmacro))
        return Fdocumentation (Fcdr (fun), raw);