comparison src/doc.c @ 41001:a17c8b15ef1b

Change doc-string comments to `new style' [w/`doc:' keyword].
author Pavel Janík <Pavel@Janik.cz>
date Tue, 13 Nov 2001 07:48:37 +0000
parents c6abdf439937
children ace002127a1c
comparison
equal deleted inserted replaced
41000:030176b8a696 41001:a17c8b15ef1b
302 { 302 {
303 return get_doc_string (filepos, 0, 1); 303 return get_doc_string (filepos, 0, 1);
304 } 304 }
305 305
306 DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0, 306 DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0,
307 "Return the documentation string of FUNCTION.\n\ 307 doc: /* Return the documentation string of FUNCTION.
308 Unless a non-nil second argument RAW is given, the\n\ 308 Unless a non-nil second argument RAW is given, the
309 string is passed through `substitute-command-keys'.") 309 string is passed through `substitute-command-keys'. */)
310 (function, raw) 310 (function, raw)
311 Lisp_Object function, raw; 311 Lisp_Object function, raw;
312 { 312 {
313 Lisp_Object fun; 313 Lisp_Object fun;
314 Lisp_Object funcar; 314 Lisp_Object funcar;
315 Lisp_Object tem, doc; 315 Lisp_Object tem, doc;
389 return doc; 389 return doc;
390 } 390 }
391 391
392 DEFUN ("documentation-property", Fdocumentation_property, 392 DEFUN ("documentation-property", Fdocumentation_property,
393 Sdocumentation_property, 2, 3, 0, 393 Sdocumentation_property, 2, 3, 0,
394 "Return the documentation string that is SYMBOL's PROP property.\n\ 394 doc: /* Return the documentation string that is SYMBOL's PROP property.
395 Third argument RAW omitted or nil means pass the result through\n\ 395 Third argument RAW omitted or nil means pass the result through
396 `substitute-command-keys' if it is a string.\n\ 396 `substitute-command-keys' if it is a string.
397 \n\ 397
398 This differs from `get' in that it can refer to strings stored in the\n\ 398 This differs from `get' in that it can refer to strings stored in the
399 `etc/DOC' file; and that it evaluates documentation properties that\n\ 399 `etc/DOC' file; and that it evaluates documentation properties that
400 aren't strings.") 400 aren't strings. */)
401 (symbol, prop, raw) 401 (symbol, prop, raw)
402 Lisp_Object symbol, prop, raw; 402 Lisp_Object symbol, prop, raw;
403 { 403 {
404 Lisp_Object tem; 404 Lisp_Object tem;
405 405
459 } 459 }
460 } 460 }
461 461
462 462
463 DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation, 463 DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation,
464 1, 1, 0, 464 1, 1, 0,
465 "Used during Emacs initialization, before dumping runnable Emacs,\n\ 465 doc: /* Used during Emacs initialization, before dumping runnable Emacs,
466 to find pointers to doc strings stored in `etc/DOC...' and\n\ 466 to find pointers to doc strings stored in `etc/DOC...' and
467 record them in function definitions.\n\ 467 record them in function definitions.
468 One arg, FILENAME, a string which does not include a directory.\n\ 468 One arg, FILENAME, a string which does not include a directory.
469 The file is found in `../etc' now; found in the `data-directory'\n\ 469 The file is found in `../etc' now; found in the `data-directory'
470 when doc strings are referred to later in the dumped Emacs.") 470 when doc strings are referred to later in the dumped Emacs. */)
471 (filename) 471 (filename)
472 Lisp_Object filename; 472 Lisp_Object filename;
473 { 473 {
474 int fd; 474 int fd;
475 char buf[1024 + 1]; 475 char buf[1024 + 1];
476 register int filled; 476 register int filled;
566 emacs_close (fd); 566 emacs_close (fd);
567 return Qnil; 567 return Qnil;
568 } 568 }
569 569
570 DEFUN ("substitute-command-keys", Fsubstitute_command_keys, 570 DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
571 Ssubstitute_command_keys, 1, 1, 0, 571 Ssubstitute_command_keys, 1, 1, 0,
572 "Substitute key descriptions for command names in STRING.\n\ 572 doc: /* Substitute key descriptions for command names in STRING.
573 Return a new string which is STRING with substrings of the form \\=\\[COMMAND]\n\ 573 Return a new string which is STRING with substrings of the form \\=\\[COMMAND]
574 replaced by either: a keystroke sequence that will invoke COMMAND,\n\ 574 replaced by either: a keystroke sequence that will invoke COMMAND,
575 or \"M-x COMMAND\" if COMMAND is not on any keys.\n\ 575 or "M-x COMMAND" if COMMAND is not on any keys.
576 Substrings of the form \\=\\{MAPVAR} are replaced by summaries\n\ 576 Substrings of the form \\=\\{MAPVAR} are replaced by summaries
577 \(made by describe-bindings) of the value of MAPVAR, taken as a keymap.\n\ 577 \(made by describe-bindings) of the value of MAPVAR, taken as a keymap.
578 Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR\n\ 578 Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR
579 as the keymap for future \\=\\[COMMAND] substrings.\n\ 579 as the keymap for future \\=\\[COMMAND] substrings.
580 \\=\\= quotes the following character and is discarded;\n\ 580 \\=\\= quotes the following character and is discarded;
581 thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output.") 581 thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. */)
582 (string) 582 (string)
583 Lisp_Object string; 583 Lisp_Object string;
584 { 584 {
585 unsigned char *buf; 585 unsigned char *buf;
586 int changed = 0; 586 int changed = 0;
587 register unsigned char *strp; 587 register unsigned char *strp;
813 { 813 {
814 Qfunction_documentation = intern ("function-documentation"); 814 Qfunction_documentation = intern ("function-documentation");
815 staticpro (&Qfunction_documentation); 815 staticpro (&Qfunction_documentation);
816 816
817 DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name, 817 DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name,
818 "Name of file containing documentation strings of built-in symbols."); 818 doc: /* Name of file containing documentation strings of built-in symbols. */);
819 Vdoc_file_name = Qnil; 819 Vdoc_file_name = Qnil;
820 820
821 defsubr (&Sdocumentation); 821 defsubr (&Sdocumentation);
822 defsubr (&Sdocumentation_property); 822 defsubr (&Sdocumentation_property);
823 defsubr (&Ssnarf_documentation); 823 defsubr (&Ssnarf_documentation);