# HG changeset patch # User Richard M. Stallman # Date 820821804 0 # Node ID e8d6c760f7961fb4995abf86fcf7a0c6f1e45bba # Parent 4192181eb8145e1f17126b12a0f35d807fa4d6f4 Explain eliminating compiler warnings about undefined variables. diff -r 4192181eb814 -r e8d6c760f796 lispref/tips.texi --- 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.