diff options
| author | Richard M. Stallman | 1994-11-01 21:04:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-11-01 21:04:29 +0000 |
| commit | 6cbf476c792cf1b493d42a71cc009ed6a0ff0dbb (patch) | |
| tree | ecf59d58cc713dd9b358b6093de7b297bd1b9981 | |
| parent | 4568da2fbadca1fd31ee28565a422b5e5bef3068 (diff) | |
| download | emacs-6cbf476c792cf1b493d42a71cc009ed6a0ff0dbb.tar.gz emacs-6cbf476c792cf1b493d42a71cc009ed6a0ff0dbb.zip | |
Add function and variable name conventions.
| -rw-r--r-- | lispref/tips.texi | 10 |
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 | |||
| 74 | @code{run-hooks}, just as the existing major modes do. @xref{Hooks}. | 74 | @code{run-hooks}, just as the existing major modes do. @xref{Hooks}. |
| 75 | 75 | ||
| 76 | @item | 76 | @item |
| 77 | If the purpose of a function is to tell you whether a certain condition | ||
| 78 | is true or false, give the function a name that ends in @samp{p}. If | ||
| 79 | the name is one word, add just @samp{p}; if the name is multiple words, | ||
| 80 | add @samp{-p}. Examples are @code{framep} and @code{frame-live-p}. | ||
| 81 | |||
| 82 | @item | ||
| 83 | If a user option variable records a true-or-false condition, give it a | ||
| 84 | name that ends in @samp{-flag}. | ||
| 85 | |||
| 86 | @item | ||
| 77 | Please do not define @kbd{C-c @var{letter}} as a key in your major | 87 | Please do not define @kbd{C-c @var{letter}} as a key in your major |
| 78 | modes. These sequences are reserved for users; they are the | 88 | modes. These sequences are reserved for users; they are the |
| 79 | @strong{only} sequences reserved for users, so we cannot do without | 89 | @strong{only} sequences reserved for users, so we cannot do without |