Mercurial > emacs
diff src/doc.c @ 85493:97bdce721eef
(Fdocumentation): Check for advice in all cases.
| author | Juanma Barranquero <lekktu@gmail.com> |
|---|---|
| date | Sat, 20 Oct 2007 20:20:18 +0000 |
| parents | 9864261d519a |
| children | 107ccd98fa12 4bc33ffdda1a |
line wrap: on
line diff
--- a/src/doc.c Sat Oct 20 17:02:54 2007 +0000 +++ b/src/doc.c Sat Oct 20 20:20:18 2007 +0000 @@ -434,18 +434,6 @@ 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 @@ 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)))
