# HG changeset patch # User Gerd Moellmann # Date 954099122 0 # Node ID f9cb3463ee2aca2bcd72f70648315c8561f62c3b # Parent 45588bd8d17e8fd67f2368b0317474ddfc02516d (Qfunction_documentation): New variable. (syms_of_doc): Initialize Qfunction_documentation. (Fdocumentation): If FUNCTION is a symbol with non-nil `function-documentation' property, return a documentation derived from that. diff -r 45588bd8d17e -r f9cb3463ee2a src/doc.c --- a/src/doc.c Sun Mar 26 18:45:57 2000 +0000 +++ b/src/doc.c Sun Mar 26 19:32:02 2000 +0000 @@ -43,6 +43,8 @@ Lisp_Object Vdoc_file_name, Vhelp_manyarg_func_alist; +Lisp_Object Qfunction_documentation; + extern char *index (); extern Lisp_Object Voverriding_local_map; @@ -309,12 +311,17 @@ Lisp_Object funcar; Lisp_Object tem, doc; + if (SYMBOLP (function) + && (tem = Fget (function, Qfunction_documentation), + !NILP (tem))) + return Fdocumentation_property (function, Qfunction_documentation, raw); + fun = Findirect_function (function); - if (SUBRP (fun)) { - if (XSUBR (fun)->doc == 0) return Qnil; - if ((EMACS_INT) XSUBR (fun)->doc >= 0) + if (XSUBR (fun)->doc == 0) + return Qnil; + else if ((EMACS_INT) XSUBR (fun)->doc >= 0) doc = build_string (XSUBR (fun)->doc); else doc = get_doc_string (make_number (- (EMACS_INT) XSUBR (fun)->doc), @@ -787,6 +794,9 @@ void syms_of_doc () { + Qfunction_documentation = intern ("function-documentation"); + staticpro (&Qfunction_documentation); + DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name, "Name of file containing documentation strings of built-in symbols."); Vdoc_file_name = Qnil;