GNU Info

Info Node: (librep.info)Macros

(librep.info)Macros


Next: Definitions Prev: Functions Up: The language
Enter node , (file) or (file)node

Macros
======

   "Macros" are used to extend the Lisp language. They consist of a
function which instead of returning a computed value, transform their
unevaluated arguments into a new form that, when evaluated, produces
the actual value of the original form.

   For example, the `when' macro (Note: Conditional Structures)
implements a new conditional operation by transforming its arguments
into a `cond' statement. That is,

     (when CONDITION FORM ...)
         ==> (cond (CONDITION FORM ...))

   Since macros do not evaluate their arguments, instead just
transforming them, they may be expanded at _compile-time_. The
resulting form is then compiled as usual.

 - Function: macrop arg
     Returns true if ARG is a macro object.

Defining Macros
Macros are defined like functions
Backquoting
Creating macros from templates
Macro Expansion
How macros are used by the evaluator
Compiling Macros
The compiler expands macros at compile-
time.

automatically generated by info2www version 1.2.2.9