126 |
name that ends in @samp{-flag}. |
name that ends in @samp{-flag}. |
127 |
|
|
128 |
@item |
@item |
129 |
|
If the purpose of a variable is to store a single function, give it a |
130 |
|
name that ends in @samp{-function}. If the purpose of a variable is |
131 |
|
to store a list of functions (i.e., the variable is a hook), please |
132 |
|
follow the naming conventions for hooks. @xref{Hooks}. |
133 |
|
|
134 |
|
@item |
135 |
@cindex reserved keys |
@cindex reserved keys |
136 |
@cindex keys, reserved |
@cindex keys, reserved |
137 |
Please do not define @kbd{C-c @var{letter}} as a key in your major |
Please do not define @kbd{C-c @var{letter}} as a key in your major |
210 |
that simply loading it has no visible effect---that should not enable |
that simply loading it has no visible effect---that should not enable |
211 |
the feature.@footnote{Consider that the package may be loaded |
the feature.@footnote{Consider that the package may be loaded |
212 |
arbitrarily by Custom for instance.} Users will request the feature by |
arbitrarily by Custom for instance.} Users will request the feature by |
213 |
invoking the command. |
invoking the command. It is a good idea to define this command |
214 |
|
as a minor mode. |
215 |
|
|
216 |
|
@cindex unloading packages |
217 |
|
If loading the file adds functions to hooks, define a function |
218 |
|
@code{@var{feature}-unload-hook}, where @var{feature} is the name of |
219 |
|
the feature the package provides, and make it undo any such changes. |
220 |
|
Using @code{unload-feature} to unload the file will run this function. |
221 |
|
@xref{Unloading}. |
222 |
|
|
223 |
@item |
@item |
224 |
It is a bad idea to define aliases for the Emacs primitives. Use the |
It is a bad idea to define aliases for the Emacs primitives. Use the |
250 |
replacements differs from that of the originals. |
replacements differs from that of the originals. |
251 |
|
|
252 |
@item |
@item |
253 |
|
Avoid using macros that define functions and variables with names that |
254 |
|
are constructed. It is best for maintenance wen the name of the |
255 |
|
function or variable being defined is given explicitly in the source |
256 |
|
code, as the second element of the list---as it is when you use |
257 |
|
@code{defun}, @code{defalias}, @code{defvar} and @code{defopt}. |
258 |
|
|
259 |
|
@item |
260 |
Please keep the names of your Emacs Lisp source files to 13 characters |
Please keep the names of your Emacs Lisp source files to 13 characters |
261 |
or less. This way, if the files are compiled, the compiled files' names |
or less. This way, if the files are compiled, the compiled files' names |
262 |
will be 14 characters or less, which is short enough to fit on all kinds |
will be 14 characters or less, which is short enough to fit on all kinds |
871 |
@end example |
@end example |
872 |
|
|
873 |
@noindent |
@noindent |
874 |
The description should be complete in one line. |
The description should be complete in one line. If the file |
875 |
|
needs a @samp{-*-} specification, put it after @var{description}. |
876 |
|
|
877 |
After the copyright notice come several @dfn{header comment} lines, |
After the copyright notice come several @dfn{header comment} lines, |
878 |
each beginning with @samp{;; @var{header-name}:}. Here is a table of |
each beginning with @samp{;; @var{header-name}:}. Here is a table of |
948 |
text is used by the Finder package, so it should make sense in that |
text is used by the Finder package, so it should make sense in that |
949 |
context. |
context. |
950 |
|
|
951 |
@item ;;; Documentation |
@item ;;; Documentation: |
952 |
This has been used in some files in place of @samp{;;; Commentary:}, |
This was used in some files in place of @samp{;;; Commentary:}, |
953 |
but @samp{;;; Commentary:} is preferred. |
but it is deprecated. |
954 |
|
|
955 |
@item ;;; Change Log: |
@item ;;; Change Log: |
956 |
This begins change log information stored in the library file (if you |
This begins change log information stored in the library file (if you |
967 |
Its purpose is to enable people to detect truncated versions of the file |
Its purpose is to enable people to detect truncated versions of the file |
968 |
from the lack of a footer line. |
from the lack of a footer line. |
969 |
@end table |
@end table |
970 |
|
|
971 |
|
@ignore |
972 |
|
arch-tag: 9ea911c2-6b1d-47dd-88b7-0a94e8b27c2e |
973 |
|
@end ignore |