]> code.delx.au - gnu-emacs/blobdiff - src/doc.c
Merge from emacs--devo--0
[gnu-emacs] / src / doc.c
index dd7f4ae0eb9b581b6ee88b09ae9d78a41d8d610c..5dc30a01053278bd3e4cdda4724af7e804f45bfc 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)))