Re: apparently undefined function called by macro
- From: gbacon@xxxxxxxxxx (Greg Bacon)
- Date: Tue, 27 Jun 2006 17:10:19 -0000
In article <4gd3pbF1ltb63U1@xxxxxxxxxxxxxx>,
Stefan Mandl <stefan.mandl@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
: From my limited knowledge:
:
: Remember that macros are functions that run during compilation.
:
: When you call:
:
: (define-foo-class bar
: ((baz :initarg :baz :accessor baz)
: (quux :initarg :quux :accessor quux)))
:
: the *compiler* has to call the macro function and therefore has to call
: your id function.
:
: So in order to make sure that the compiler knows id's definition,
: wrapping id into a eval-when form is no mere workaround but standard
: technique.
Thanks, Stefan.
I see that FAQ 3-7 also addresses the issue:
http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/lisp/part3/faq-doc-8.html
I was confused because in chapter 24 of PCL, Seibel defines similar
macros that call functions, and all the code is ASDF-loadable.
The difference that I missed is he defines the macros in one package and
expands them in others after the whole supporting cast has been loaded.
Greg
.
- References:
- apparently undefined function called by macro
- From: Greg Bacon
- Re: apparently undefined function called by macro
- From: Stefan Mandl
- apparently undefined function called by macro
- Prev by Date: Re: Kenny, did you write this article?!? (Cells)
- Next by Date: Re: Why is LISP syntax superior?
- Previous by thread: Re: apparently undefined function called by macro
- Next by thread: Re: apparently undefined function called by macro
- Index(es):
Relevant Pages
|