diff options
| author | Eli Zaretskii | 2017-09-22 12:41:00 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-09-22 12:41:00 +0300 |
| commit | 0273916618f33ffd56b861cea187e9df337b8e2d (patch) | |
| tree | 89999c2a23ce6d03761c06bcbf6da0d71fdb87c6 | |
| parent | d24ec5854098841388dfecf2c668e7f48f348af0 (diff) | |
| download | emacs-0273916618f33ffd56b861cea187e9df337b8e2d.tar.gz emacs-0273916618f33ffd56b861cea187e9df337b8e2d.zip | |
Document the 'list-FOO' convention
* doc/lispref/tips.texi (Coding Conventions): Document the
list-FOO convention.
| -rw-r--r-- | doc/lispref/tips.texi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index bed3bed95bd..17fd4a1027e 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -68,10 +68,13 @@ costs.}. Use two hyphens to separate prefix and name if the symbol is | |||
| 68 | not meant to be used by other packages. | 68 | not meant to be used by other packages. |
| 69 | 69 | ||
| 70 | Occasionally, for a command name intended for users to use, it is more | 70 | Occasionally, for a command name intended for users to use, it is more |
| 71 | convenient if some words come before the package's name prefix. And | 71 | convenient if some words come before the package's name prefix. For |
| 72 | constructs that define functions, variables, etc., work better if they | 72 | example, it is our convention to have commands that list objects named |
| 73 | start with @samp{defun} or @samp{defvar}, so put the name prefix later | 73 | as @samp{list-@var{something}}, e.g., a package called @samp{frob} |
| 74 | on in the name. | 74 | could have a command @samp{list-frobs}, when its other global symbols |
| 75 | begin with @samp{frob-}. Also, constructs that define functions, | ||
| 76 | variables, etc., work better if they start with @samp{defun} or | ||
| 77 | @samp{defvar}, so put the name prefix later on in the name. | ||
| 75 | 78 | ||
| 76 | This recommendation applies even to names for traditional Lisp | 79 | This recommendation applies even to names for traditional Lisp |
| 77 | primitives that are not primitives in Emacs Lisp---such as | 80 | primitives that are not primitives in Emacs Lisp---such as |