diff options
| author | Richard M. Stallman | 1996-01-05 06:03:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-01-05 06:03:24 +0000 |
| commit | 6a994023c4e73dfeb72881d915e2ed17396b2792 (patch) | |
| tree | 58dd49bf7822545bf696cfa2a1991d2fe6f4faf6 | |
| parent | 7b9af7a02a1dd1401e9a5bdab831a640581a76c7 (diff) | |
| download | emacs-6a994023c4e73dfeb72881d915e2ed17396b2792.tar.gz emacs-6a994023c4e73dfeb72881d915e2ed17396b2792.zip | |
Explain eliminating compiler warnings about undefined variables.
| -rw-r--r-- | lispref/tips.texi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lispref/tips.texi b/lispref/tips.texi index 3d46466832b..c66b71033c2 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -246,6 +246,17 @@ only for program-generated buffers.) The users will find Emacs more | |||
| 246 | coherent if all libraries use the same conventions. | 246 | coherent if all libraries use the same conventions. |
| 247 | 247 | ||
| 248 | @item | 248 | @item |
| 249 | Try to avoid compiler warnings about undefined free variables, by adding | ||
| 250 | @cdode{defvar} definitions for these variables. | ||
| 251 | |||
| 252 | If you bind a variable in one function, and use it or set it in another | ||
| 253 | function, the compiler warns about the latter function unless the | ||
| 254 | variable has a definition. But often these variables have short names, | ||
| 255 | and it is not clean for Lisp packages to define such variables names. | ||
| 256 | Therefore, you should rename the variable to start with the name prefix | ||
| 257 | used for the other functions and variables in your package. | ||
| 258 | |||
| 259 | @item | ||
| 249 | Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the | 260 | Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the |
| 250 | default indentation parameters. | 261 | default indentation parameters. |
| 251 | 262 | ||