X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/e0e36cac4adaa32ad755a34c811366dd8e4655bc..c530e1c2a3a036d71942c354ba11b30a06341fd7:/src/doc.c diff --git a/src/doc.c b/src/doc.c index 31f1e5a917..c56f0b6c9d 100644 --- a/src/doc.c +++ b/src/doc.c @@ -36,6 +36,7 @@ along with GNU Emacs. If not, see . */ Lisp_Object Qfunction_documentation; +extern Lisp_Object Qclosure; /* Buffer used for reading from documentation file. */ static char *get_doc_string_buffer; static int get_doc_string_buffer_size; @@ -356,6 +357,11 @@ string is passed through `substitute-command-keys'. */) else return Qnil; } + else if (FUNVECP (fun)) + { + /* Unless otherwise handled, funvecs have no documentation. */ + return Qnil; + } else if (STRINGP (fun) || VECTORP (fun)) { return build_string ("Keyboard macro."); @@ -383,6 +389,8 @@ string is passed through `substitute-command-keys'. */) else return Qnil; } + else if (EQ (funcar, Qclosure)) + return Fdocumentation (Fcdr (XCDR (fun)), raw); else if (EQ (funcar, Qmacro)) return Fdocumentation (Fcdr (fun), raw); else @@ -475,7 +483,7 @@ aren't strings. */) } else if (!STRINGP (tem)) /* Feval protects its argument. */ - tem = Feval (tem); + tem = Feval (tem, Qnil); if (NILP (raw) && STRINGP (tem)) tem = Fsubstitute_command_keys (tem); @@ -510,6 +518,8 @@ store_function_docstring (Lisp_Object fun, EMACS_INT offset) } else if (EQ (tem, Qmacro)) store_function_docstring (XCDR (fun), offset); + else if (EQ (tem, Qclosure)) + store_function_docstring (Fcdr (XCDR (fun)), offset); } /* Bytecode objects sometimes have slots for it. */