]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fdocumentation): Check for advice in all cases.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 20 Oct 2007 20:21:42 +0000 (20:21 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 20 Oct 2007 20:21:42 +0000 (20:21 +0000)
src/ChangeLog
src/doc.c

index dda5d8e396dbcfe65719abeadc5a9b3b30960032..915e31f7c879acedf062ec869d7048faf8f470e9 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-20  Juanma Barranquero  <lekktu@gmail.com>
+
+       * doc.c (Fdocumentation): Check for advice in all cases.
+
 2007-10-19  Chong Yidong  <cyd@stupidchicken.com>
 
        * Makefile.in [HAVE_LIBRESOLV]: Add -lresolv to linker flags.
index 53f645c6e5301dd55f56606df7d77d9330e54db4..ec02449035a40cce3c30258031ac936b7d777256 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -434,18 +434,6 @@ 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);
@@ -458,6 +446,18 @@ string is passed through `substitute-command-keys'.  */)
       xsignal1 (Qinvalid_function, fun);
     }
 
+  /* 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);
+    }
+
   /* If DOC is 0, it's typically because of a dumped file missing
      from the DOC file (bug in src/Makefile.in).  */
   if (EQ (doc, make_number (0)))