aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-10-30 18:26:30 +0000
committerRichard M. Stallman2001-10-30 18:26:30 +0000
commit5c5b7d3e7de97c604de26580828d32ecaf355cf7 (patch)
tree490d4d6728384643fe446c4a8f1201a018c3e896
parent2dc96f0f8e2307d827eaa72da4d886e526d10bdb (diff)
downloademacs-5c5b7d3e7de97c604de26580828d32ecaf355cf7.tar.gz
emacs-5c5b7d3e7de97c604de26580828d32ecaf355cf7.zip
Document textual convention for doc strings of predicates.
Say never to change the case of a symbol.
-rw-r--r--lispref/tips.texi21
1 files changed, 21 insertions, 0 deletions
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 20fe774d185..3031ac5ce92 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -562,6 +562,13 @@ all non-@code{nil} values are equivalent and indicate explicitly what
562@code{nil} and non-@code{nil} mean. 562@code{nil} and non-@code{nil} mean.
563 563
564@item 564@item
565The documentation string for a function that is a yes-or-no predicate
566should start with words such as ``Return t if @dots{}'', to indicate
567explicitly what constitutes ``truth''. The word ``return'' avoids
568starting the sentence with lower-case ``t'', which is somewhat
569distracting.
570
571@item
565When a function's documentation string mentions the value of an argument 572When a function's documentation string mentions the value of an argument
566of the function, use the argument name in capital letters as if it were 573of the function, use the argument name in capital letters as if it were
567a name for that value. Thus, the documentation string of the function 574a name for that value. Thus, the documentation string of the function
@@ -583,6 +590,20 @@ have the form (KEY . VALUE). Here, KEY is ...
583@end example 590@end example
584 591
585@item 592@item
593Never change the case of a Lisp symbol when you mention it in a doc
594string. If the symbol's name is @code{foo}, write ``foo'', not
595``Foo'' (which is a different symbol).
596
597This might appear to contradict the policy of writing function
598argument values, but there is no real contradiction; the argument
599@emph{value} is not the same thing as the @emph{symbol} which the
600function uses to hold the value.
601
602If this puts a lower-case letter at the beginning of a sentence
603and that annoys you, rewrite the sentence so that the symbol
604is not at the start of it.
605
606@item
586If a line in a documentation string begins with an open-parenthesis, 607If a line in a documentation string begins with an open-parenthesis,
587write a backslash before the open-parenthesis, like this: 608write a backslash before the open-parenthesis, like this:
588 609