>>>>> "Ole" == Ole Rohne <ole.rohne@cern.ch> writes:
Ole> I'm wondering: If I compile a file containing,
Ole> (eval-when (eval compile) (defmacro foo ...) ...),
Ole> is it correct for FOO to be defined as a macro in the lisp image where
Ole> the compilation takes place? Or should the DEFMACRO only have effect
Ole> for the compilation unit? I saw something relating to this in the
Ole> hyperspec, but I didn't really understand it.
Ole> Here is what happens to me: I compile hyp.lisp, MABS gets defined as a
Ole> macro in that image. I dump and restart maxima.core, MABS is still
Ole> defined as a macro in my image. On the other hand, if I start a fresh
Ole> lisp and load hyp.x86f, MABS is not defined as a macro because of the
Ole> EVAL-WHEN. It would be interesting to know if the CVS version behaves
Ole> differently from my stock 18c. I am not, however, a CMUCL compiling
Ole> person.
I see the same behavior with my CVS version, but I don't know exactly
what version that is.
Also, I just replaced (eval-when (eval compile)...) with just
(eval-when (compile)...) in hyp.lisp. It solves your immediate
problem about MABS et al being defined. That is, if I save a core
file without exiting, MABS is not defined, and your test example works
as expected.
Ray