# HG changeset patch # User Richard M. Stallman # Date 1004466390 0 # Node ID 37a08b5afdeddaf4f0cea9e47374b590b0702ead # Parent 7f616838d9312adbac9f2509ef32400e1aa1caa8 Document textual convention for doc strings of predicates. Say never to change the case of a symbol. diff -r 7f616838d931 -r 37a08b5afded lispref/tips.texi --- a/lispref/tips.texi Tue Oct 30 18:19:46 2001 +0000 +++ b/lispref/tips.texi Tue Oct 30 18:26:30 2001 +0000 @@ -562,6 +562,13 @@ @code{nil} and non-@code{nil} mean. @item +The documentation string for a function that is a yes-or-no predicate +should start with words such as ``Return t if @dots{}'', to indicate +explicitly what constitutes ``truth''. The word ``return'' avoids +starting the sentence with lower-case ``t'', which is somewhat +distracting. + +@item When a function's documentation string mentions the value of an argument of the function, use the argument name in capital letters as if it were a name for that value. Thus, the documentation string of the function @@ -583,6 +590,20 @@ @end example @item +Never change the case of a Lisp symbol when you mention it in a doc +string. If the symbol's name is @code{foo}, write ``foo'', not +``Foo'' (which is a different symbol). + +This might appear to contradict the policy of writing function +argument values, but there is no real contradiction; the argument +@emph{value} is not the same thing as the @emph{symbol} which the +function uses to hold the value. + +If this puts a lower-case letter at the beginning of a sentence +and that annoys you, rewrite the sentence so that the symbol +is not at the start of it. + +@item If a line in a documentation string begins with an open-parenthesis, write a backslash before the open-parenthesis, like this: