diff options
Diffstat (limited to 'src/doc.c')
-rw-r--r-- | src/doc.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/doc.c b/src/doc.c index 53de214c887..c2a627ae984 100644 --- a/src/doc.c +++ b/src/doc.c @@ -447,6 +447,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))) @@ -692,15 +704,17 @@ the same file name is found in the `doc-directory'. */) if (fromfile[len-1] == 'c') fromfile[len-1] = 'o'; - if (EQ (Fmember (build_string (fromfile), Vbuild_files), Qnil)) - skip_file = 1; - else - skip_file = 0; + skip_file = NILP (Fmember (build_string (fromfile), + Vbuild_files)); } sym = oblookup (Vobarray, p + 2, multibyte_chars_in_text (p + 2, end - p - 2), end - p - 2); + /* Check skip_file so that when a function is defined several + times in different files (typically, once in xterm, once in + w32term, ...), we only pay attention to the one that + matters. */ if (! skip_file && SYMBOLP (sym)) { /* Attach a docstring to a variable? */ @@ -884,7 +898,7 @@ a new string, without any text properties, is returned. */) struct buffer *oldbuf; int start_idx; /* This is for computing the SHADOWS arg for describe_map_tree. */ - Lisp_Object active_maps = Fcurrent_active_maps (Qnil); + Lisp_Object active_maps = Fcurrent_active_maps (Qnil, Qnil); Lisp_Object earlier_maps; changed = 1; |