Mercurial > emacs
comparison src/doc.c @ 27552:60c820c7f330
(Vhelp_manyarg_func_alist): New variable.
(Fdocumentation): Use it.
(syms_of_doc): Define it.
author | Dave Love <fx@gnu.org> |
---|---|
date | Tue, 01 Feb 2000 14:45:38 +0000 |
parents | b1863c0b8f9c |
children | a7b55765b7c4 |
comparison
equal
deleted
inserted
replaced
27551:2dd8115a9f72 | 27552:60c820c7f330 |
---|---|
39 #include "lisp.h" | 39 #include "lisp.h" |
40 #include "buffer.h" | 40 #include "buffer.h" |
41 #include "keyboard.h" | 41 #include "keyboard.h" |
42 #include "charset.h" | 42 #include "charset.h" |
43 | 43 |
44 Lisp_Object Vdoc_file_name; | 44 Lisp_Object Vdoc_file_name, Vhelp_manyarg_func_alist; |
45 | 45 |
46 extern char *index (); | 46 extern char *index (); |
47 | 47 |
48 extern Lisp_Object Voverriding_local_map; | 48 extern Lisp_Object Voverriding_local_map; |
49 | 49 |
317 if ((EMACS_INT) XSUBR (fun)->doc >= 0) | 317 if ((EMACS_INT) XSUBR (fun)->doc >= 0) |
318 doc = build_string (XSUBR (fun)->doc); | 318 doc = build_string (XSUBR (fun)->doc); |
319 else | 319 else |
320 doc = get_doc_string (make_number (- (EMACS_INT) XSUBR (fun)->doc), | 320 doc = get_doc_string (make_number (- (EMACS_INT) XSUBR (fun)->doc), |
321 0, 0); | 321 0, 0); |
322 if (! NILP (tem = Fassq (function, Vhelp_manyarg_func_alist))) | |
323 doc = concat3 (doc, build_string ("\n"), Fcdr (tem)); | |
322 } | 324 } |
323 else if (COMPILEDP (fun)) | 325 else if (COMPILEDP (fun)) |
324 { | 326 { |
325 if ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING) | 327 if ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING) |
326 return Qnil; | 328 return Qnil; |
779 syms_of_doc () | 781 syms_of_doc () |
780 { | 782 { |
781 DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name, | 783 DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name, |
782 "Name of file containing documentation strings of built-in symbols."); | 784 "Name of file containing documentation strings of built-in symbols."); |
783 Vdoc_file_name = Qnil; | 785 Vdoc_file_name = Qnil; |
786 DEFVAR_LISP ("help-manyarg-func-alist", &Vhelp_manyarg_func_alist, | |
787 "Alist of primitive functions and descriptions of their arg lists.\n\ | |
788 All special forms and primitives which effectively have &rest args\n\ | |
789 should have an entry here so that `documentation' can provide their\n\ | |
790 arg list."); | |
791 Vhelp_manyarg_func_alist = Qnil; | |
784 | 792 |
785 defsubr (&Sdocumentation); | 793 defsubr (&Sdocumentation); |
786 defsubr (&Sdocumentation_property); | 794 defsubr (&Sdocumentation_property); |
787 defsubr (&Ssnarf_documentation); | 795 defsubr (&Ssnarf_documentation); |
788 defsubr (&Ssubstitute_command_keys); | 796 defsubr (&Ssubstitute_command_keys); |