GNU Info

Info Node: (elisp)Problems with Macros

(elisp)Problems with Macros


Prev: Backquote Up: Macros
Enter node , (file) or (file)node

Common Problems Using Macros
============================

   The basic facts of macro expansion have counterintuitive
consequences.  This section describes some important consequences that
can lead to trouble, and rules to follow to avoid trouble.

Wrong Time
Do the work in the expansion, not in the macro.
Argument Evaluation
The expansion should evaluate each macro arg once.
Surprising Local Vars
Local variable bindings in the expansion
require special care.
Eval During Expansion
Don't evaluate them; put them in the expansion.
Repeated Expansion
Avoid depending on how many times expansion is done.

automatically generated by info2www version 1.2.2.9