From: Richard M. Stallman Date: Fri, 19 Oct 2007 17:23:38 +0000 (+0000) Subject: (Fdocumentation): Check for and handle an advised function. X-Git-Tag: emacs-pretest-23.0.90~10219 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a1534d3c320e010e61d133de005450463dd8091;p=emacs.git (Fdocumentation): Check for and handle an advised function. --- diff --git a/src/ChangeLog b/src/ChangeLog index 11ba1348412..a74c33a0e26 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-10-19 Richard Stallman + + * doc.c (Fdocumentation): Check for and handle an advised function. + 2007-10-19 Juanma Barranquero * process.c (Fset_process_filter): Doc fix. diff --git a/src/doc.c b/src/doc.c index 4cd43f0ae90..53f645c6e53 100644 --- 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);