X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/b2529d56b5126319a1659dc1530d6fc102cc21d6..f619ad4ca2ce943d53589469c010e451afab97dd:/doc/lispref/macros.texi diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index 152b7b652b..c66feec08b 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi @@ -1,7 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2001, 2002, -@c 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998, 2001-2011 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/macros @node Macros, Customization, Functions, Top @@ -178,16 +177,13 @@ itself---they would be computed at compile time, which is not useful. already be defined in Lisp when the calls to them are compiled. The compiler has a special feature to help you do this: if a file being compiled contains a @code{defmacro} form, the macro is defined -temporarily for the rest of the compilation of that file. To make this -feature work, you must put the @code{defmacro} in the same file where it -is used, and before its first use. - - Byte-compiling a file executes any @code{require} calls at top-level -in the file. This is in case the file needs the required packages for -proper compilation. One way to ensure that necessary macro definitions -are available during compilation is to require the files that define -them (@pxref{Named Features}). To avoid loading the macro definition files -when someone @emph{runs} the compiled program, write +temporarily for the rest of the compilation of that file. + + Byte-compiling a file also executes any @code{require} calls at +top-level in the file, so you can ensure that necessary macro +definitions are available during compilation by requiring the files +that define them (@pxref{Named Features}). To avoid loading the macro +definition files when someone @emph{runs} the compiled program, write @code{eval-when-compile} around the @code{require} calls (@pxref{Eval During Compile}). @@ -356,17 +352,6 @@ Here are some examples: @end group @end example -In old Emacs versions, before version 19.29, @samp{`} used a different -syntax which required an extra level of parentheses around the entire -backquote construct. Likewise, each @samp{,} or @samp{,@@} substitution -required an extra level of parentheses surrounding both the @samp{,} or -@samp{,@@} and the following expression. The old syntax required -whitespace between the @samp{`}, @samp{,} or @samp{,@@} and the -following expression. - -This syntax is still accepted, for compatibility with old Emacs -versions, but support for it will be removed in the future. - @node Problems with Macros @section Common Problems Using Macros @@ -623,7 +608,7 @@ it. Here is an example: Another problem with calling @code{eval} in a macro definition is that it probably won't do what you intend in a compiled program. The -byte-compiler runs macro definitions while compiling the program, when +byte compiler runs macro definitions while compiling the program, when the program's own computations (which you might have wished to access with @code{eval}) don't occur and its local variable bindings don't exist. @@ -696,7 +681,7 @@ either. @section Indenting Macros You can use the @code{declare} form in the macro definition to -specify how to @key{TAB} should indent indent calls to the macro. You +specify how to @key{TAB} should indent calls to the macro. You write it like this: @example @@ -746,7 +731,3 @@ indentation is being computed by @kbd{C-M-q}; if the value is a number, @kbd{C-M-q} need not recalculate indentation for the following lines until the end of the list. @end table - -@ignore - arch-tag: d4cce66d-1047-45c3-bfde-db6719d6e82b -@end ignore