aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-12-23 06:38:58 +0000
committerRichard M. Stallman2001-12-23 06:38:58 +0000
commitf1842270a5d35f410a27c2a280b294aa1ecedc8f (patch)
treecfd4bcdb0e010732b54f1d6cdaf6b61528f060d3
parentc95eaa61ceb8715bd4d4bb175a069298ffa637f0 (diff)
downloademacs-f1842270a5d35f410a27c2a280b294aa1ecedc8f.tar.gz
emacs-f1842270a5d35f410a27c2a280b294aa1ecedc8f.zip
Document new doc string format.
-rw-r--r--lispref/internals.texi26
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
446DEFUN ("or", For, Sor, 0, UNEVALLED, 0, 446DEFUN ("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.
448The remaining args are not evalled at all.\n\ 448The remaining args are not evalled at all.
449If all args return nil, return nil.
449@end group 450@end group
450@group 451@group
451If all args return nil, return nil.") 452usage: (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
534should receive no arguments when called interactively. 535should receive no arguments when called interactively.
535 536
536@item doc 537@item doc
537This is the documentation string. It is written just like a 538This is the documentation string. It uses C comment syntax rather
538documentation string for a function defined in Lisp, except you must 539than C string syntax because comment syntax requires nothing special
539write @samp{\n\} at the end of each line. In particular, the first line 540to include multiple lines. The @samp{doc:} identifies the comment
540should be a single sentence. 541that follows as the documentation string. The @samp{/*} and @samp{*/}
542delimiters that begin and end the comment are not part of the
543documentation string.
544
545If 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
547for documentation purposes. This way, you can use different argument
548names in the documentation string from the ones used in the C code.
549
550All the usual rules for documentation strings in Lisp code
551(@pxref{Documentation Tips}) apply to C code documentation strings
552too.
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