Mercurial > emacs
changeset 14028:e8d6c760f796
Explain eliminating compiler warnings about undefined variables.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 05 Jan 1996 06:03:24 +0000 |
parents | 4192181eb814 |
children | 8812f5ef65db |
files | lispref/tips.texi |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/tips.texi Fri Jan 05 02:42:32 1996 +0000 +++ b/lispref/tips.texi Fri Jan 05 06:03:24 1996 +0000 @@ -246,6 +246,17 @@ coherent if all libraries use the same conventions. @item +Try to avoid compiler warnings about undefined free variables, by adding +@cdode{defvar} definitions for these variables. + +If you bind a variable in one function, and use it or set it in another +function, the compiler warns about the latter function unless the +variable has a definition. But often these variables have short names, +and it is not clean for Lisp packages to define such variables names. +Therefore, you should rename the variable to start with the name prefix +used for the other functions and variables in your package. + +@item Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the default indentation parameters.