summaryrefslogtreecommitdiff
path: root/lispref/tips.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-11-01 21:04:29 +0000
committerRichard M. Stallman <rms@gnu.org>1994-11-01 21:04:29 +0000
commit6b0fceab6f0b0035293c5124e9245450ba904c2c (patch)
tree488d1aa3ee8b79c893e387a415da122a152dd6dc /lispref/tips.texi
parent3333e76e6e2d41ab9dcfb169ad2749f51d8d010f (diff)
downloademacs-6b0fceab6f0b0035293c5124e9245450ba904c2c.tar.gz
Add function and variable name conventions.
Diffstat (limited to 'lispref/tips.texi')
-rw-r--r--lispref/tips.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 1e50f672d1d..f6e240c9c41 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -74,6 +74,16 @@ 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
@strong{only} sequences reserved for users, so we cannot do without