changeset 85446:9864261d519a

(Fdocumentation): Check for and handle an advised function.
author Richard M. Stallman <rms@gnu.org>
date Fri, 19 Oct 2007 17:23:31 +0000
parents 3bc55977b5f8
children 281899c60690
files src/doc.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);