bradb <brad.beveridge@gmail.com> wrote:
+---------------
| Hi all, I get the feeling that this is an easy question, but I couldn't
| find the answer easily. It appears that I need to somehow load the
| file before it gets compiled. My macro relies on a function, asdf
| complains that the function doesn't exist yet.
+---------------
Macro definitions affect the compile-time -- or more precisely,
the macro-expansion-time -- environment of the compiler; function
definitions normally do not. Macros need to be able to run at
compile-time/macro-expansion-time, so if a macro calls an external
function, the DEFUN for that function needs to be inside an
appropriate EVAL-WHEN[1] to force *it* into the compile-time
environment as well.
-Rob
[1] http://www.lispworks.com/documentation/HyperSpec/Body/s_eval_w.htm
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607