Mercurial > emacs
comparison lispref/tips.texi @ 71375:706e41b8c07f
(Coding Conventions): Better explain conventions for definition constructs.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 16 Jun 2006 15:22:59 +0000 |
parents | 0ebac95569f4 |
children | 3184a667d8db 138027c8c982 |
comparison
equal
deleted
inserted
replaced
71374:a358bd87a242 | 71375:706e41b8c07f |
---|---|
202 standard Emacs, prominent comments at the beginning of the file should | 202 standard Emacs, prominent comments at the beginning of the file should |
203 say which functions are replaced, and how the behavior of the | 203 say which functions are replaced, and how the behavior of the |
204 replacements differs from that of the originals. | 204 replacements differs from that of the originals. |
205 | 205 |
206 @item | 206 @item |
207 Avoid using macros that define functions and variables with names that | 207 Constructs that define a function or variable should be macros, |
208 are constructed. It is best for maintenance when the name of the | 208 not functions, and their names should start with @samp{def}. |
209 function or variable being defined is given explicitly in the source | 209 |
210 code, as the second element of the list---as it is when you use | 210 @item |
211 @code{defun}, @code{defalias}, @code{defvar} and @code{defcustom}. | 211 Macros that define a functions or variables should take the name to be |
212 defined as the first argument. That will help various tools find the | |
213 definition automatically. Avoid constructing the names in the macro | |
214 itself, since that would confuse these tools. | |
212 | 215 |
213 @item | 216 @item |
214 Please keep the names of your Emacs Lisp source files to 13 characters | 217 Please keep the names of your Emacs Lisp source files to 13 characters |
215 or less. This way, if the files are compiled, the compiled files' names | 218 or less. This way, if the files are compiled, the compiled files' names |
216 will be 14 characters or less, which is short enough to fit on all kinds | 219 will be 14 characters or less, which is short enough to fit on all kinds |