]> git.eshelyaron.com Git - emacs.git/commitdiff
Add function and variable name conventions.
authorRichard M. Stallman <rms@gnu.org>
Tue, 1 Nov 1994 21:04:29 +0000 (21:04 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 1 Nov 1994 21:04:29 +0000 (21:04 +0000)
lispref/tips.texi

index 1e50f672d1de3cfbd379b5d485fa464229b2b070..f6e240c9c415e94c162d2196ac8624879b63fcc4 100644 (file)
@@ -73,6 +73,16 @@ Macros}.
 If you define a major mode, make sure to run a hook variable using
 @code{run-hooks}, just as the existing major modes do.  @xref{Hooks}.
 
+@item
+If the purpose of a function is to tell you whether a certain condition
+is true or false, give the function a name that ends in @samp{p}.  If
+the name is one word, add just @samp{p}; if the name is multiple words,
+add @samp{-p}.  Examples are @code{framep} and @code{frame-live-p}.
+
+@item
+If a user option variable records a true-or-false condition, give it a
+name that ends in @samp{-flag}.
+
 @item
 Please do not define @kbd{C-c @var{letter}} as a key in your major
 modes.  These sequences are reserved for users; they are the