diff options
| author | Chong Yidong | 2009-03-10 00:43:20 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-03-10 00:43:20 +0000 |
| commit | ebfbce679377b4ead34b24df1a918f7cd17e5974 (patch) | |
| tree | 7c899c21cf43a3439e45d48caa676747ff054d98 | |
| parent | 955964d7e985c44d107ea1fa7fecc0082f1b02ac (diff) | |
| download | emacs-ebfbce679377b4ead34b24df1a918f7cd17e5974.tar.gz emacs-ebfbce679377b4ead34b24df1a918f7cd17e5974.zip | |
(Compiling Macros): Omit misleading sentence, which implied that
macros can only be used in the same file they are defined.
(Backquote): Remove obsolete information about Emacs 19.
| -rw-r--r-- | doc/lispref/macros.texi | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index a78f8c16f1d..935dc6553dc 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi | |||
| @@ -178,16 +178,13 @@ itself---they would be computed at compile time, which is not useful. | |||
| 178 | already be defined in Lisp when the calls to them are compiled. The | 178 | already be defined in Lisp when the calls to them are compiled. The |
| 179 | compiler has a special feature to help you do this: if a file being | 179 | compiler has a special feature to help you do this: if a file being |
| 180 | compiled contains a @code{defmacro} form, the macro is defined | 180 | compiled contains a @code{defmacro} form, the macro is defined |
| 181 | temporarily for the rest of the compilation of that file. To make this | 181 | temporarily for the rest of the compilation of that file. |
| 182 | feature work, you must put the @code{defmacro} in the same file where it | 182 | |
| 183 | is used, and before its first use. | 183 | Byte-compiling a file also executes any @code{require} calls at |
| 184 | 184 | top-level in the file, so you can ensure that necessary macro | |
| 185 | Byte-compiling a file executes any @code{require} calls at top-level | 185 | definitions are available during compilation by requiring the files |
| 186 | in the file. This is in case the file needs the required packages for | 186 | that define them (@pxref{Named Features}). To avoid loading the macro |
| 187 | proper compilation. One way to ensure that necessary macro definitions | 187 | definition files when someone @emph{runs} the compiled program, write |
| 188 | are available during compilation is to require the files that define | ||
| 189 | them (@pxref{Named Features}). To avoid loading the macro definition files | ||
| 190 | when someone @emph{runs} the compiled program, write | ||
| 191 | @code{eval-when-compile} around the @code{require} calls (@pxref{Eval | 188 | @code{eval-when-compile} around the @code{require} calls (@pxref{Eval |
| 192 | During Compile}). | 189 | During Compile}). |
| 193 | 190 | ||
| @@ -356,17 +353,6 @@ Here are some examples: | |||
| 356 | @end group | 353 | @end group |
| 357 | @end example | 354 | @end example |
| 358 | 355 | ||
| 359 | In old Emacs versions, before version 19.29, @samp{`} used a different | ||
| 360 | syntax which required an extra level of parentheses around the entire | ||
| 361 | backquote construct. Likewise, each @samp{,} or @samp{,@@} substitution | ||
| 362 | required an extra level of parentheses surrounding both the @samp{,} or | ||
| 363 | @samp{,@@} and the following expression. The old syntax required | ||
| 364 | whitespace between the @samp{`}, @samp{,} or @samp{,@@} and the | ||
| 365 | following expression. | ||
| 366 | |||
| 367 | This syntax is still accepted, for compatibility with old Emacs | ||
| 368 | versions, but support for it will be removed in the future. | ||
| 369 | |||
| 370 | @node Problems with Macros | 356 | @node Problems with Macros |
| 371 | @section Common Problems Using Macros | 357 | @section Common Problems Using Macros |
| 372 | 358 | ||