# HG changeset patch # User Richard M. Stallman # Date 1192814611 0 # Node ID 9864261d519a2a4145fd2edf74cec676ca5fbb72 # Parent 3bc55977b5f8404f9c596828a3e07bae8a032943 (Fdocumentation): Check for and handle an advised function. diff -r 3bc55977b5f8 -r 9864261d519a src/doc.c --- a/src/doc.c Fri Oct 19 17:16:43 2007 +0000 +++ b/src/doc.c Fri Oct 19 17:23:31 2007 +0000 @@ -434,6 +434,18 @@ 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);