diff options
| author | Richard M. Stallman | 2001-12-23 06:38:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-12-23 06:38:58 +0000 |
| commit | f1842270a5d35f410a27c2a280b294aa1ecedc8f (patch) | |
| tree | cfd4bcdb0e010732b54f1d6cdaf6b61528f060d3 | |
| parent | c95eaa61ceb8715bd4d4bb175a069298ffa637f0 (diff) | |
| download | emacs-f1842270a5d35f410a27c2a280b294aa1ecedc8f.tar.gz emacs-f1842270a5d35f410a27c2a280b294aa1ecedc8f.zip | |
Document new doc string format.
| -rw-r--r-- | lispref/internals.texi | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/lispref/internals.texi b/lispref/internals.texi index 8e4ee5987d5..13470037586 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi | |||
| @@ -444,11 +444,12 @@ appearance.) | |||
| 444 | @smallexample | 444 | @smallexample |
| 445 | @group | 445 | @group |
| 446 | DEFUN ("or", For, Sor, 0, UNEVALLED, 0, | 446 | DEFUN ("or", For, Sor, 0, UNEVALLED, 0, |
| 447 | "Eval args until one of them yields non-nil; return that value.\n\ | 447 | doc: /* Eval args until one of them yields non-nil, then return that value. |
| 448 | The remaining args are not evalled at all.\n\ | 448 | The remaining args are not evalled at all. |
| 449 | If all args return nil, return nil. | ||
| 449 | @end group | 450 | @end group |
| 450 | @group | 451 | @group |
| 451 | If all args return nil, return nil.") | 452 | usage: (or CONDITIONS ...) */) |
| 452 | (args) | 453 | (args) |
| 453 | Lisp_Object args; | 454 | Lisp_Object args; |
| 454 | @{ | 455 | @{ |
| @@ -534,10 +535,21 @@ called interactively. A value of @code{""} indicates a function that | |||
| 534 | should receive no arguments when called interactively. | 535 | should receive no arguments when called interactively. |
| 535 | 536 | ||
| 536 | @item doc | 537 | @item doc |
| 537 | This is the documentation string. It is written just like a | 538 | This is the documentation string. It uses C comment syntax rather |
| 538 | documentation string for a function defined in Lisp, except you must | 539 | than C string syntax because comment syntax requires nothing special |
| 539 | write @samp{\n\} at the end of each line. In particular, the first line | 540 | to include multiple lines. The @samp{doc:} identifies the comment |
| 540 | should be a single sentence. | 541 | that follows as the documentation string. The @samp{/*} and @samp{*/} |
| 542 | delimiters that begin and end the comment are not part of the | ||
| 543 | documentation string. | ||
| 544 | |||
| 545 | If the last line of the documentation string begins with the keyword | ||
| 546 | @samp{usage:}, the rest of the line is treated as the argument list | ||
| 547 | for documentation purposes. This way, you can use different argument | ||
| 548 | names in the documentation string from the ones used in the C code. | ||
| 549 | |||
| 550 | All the usual rules for documentation strings in Lisp code | ||
| 551 | (@pxref{Documentation Tips}) apply to C code documentation strings | ||
| 552 | too. | ||
| 541 | @end table | 553 | @end table |
| 542 | 554 | ||
| 543 | After the call to the @code{DEFUN} macro, you must write the argument | 555 | After the call to the @code{DEFUN} macro, you must write the argument |