[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue EVAL-WHEN-NON-TOP-LEVEL, v2



re:     (eval-when (eval compile load)
	    (defmacro bar ...))
    Suppose we do as you suggest and say that the bodies of top-level
    EVAL-WHENs continue to be top-level, but prevent nested EVAL-WHENs
    from doing COMPILE evaluation.  Then, since the macro definition for
    BAR is at top-level, it must cause some compile-time magic to happen
    when it is compiled (processing for the LOAD situation).  This implies
    that you couldn't implement DEFMACRO by expanding it into an EVAL-WHEN,
    because the required magic actions would be suppressed.

Say, didn't you realize that the COMPILE situation in the outter eval-when
means that the DEFMACRO will be evaluated at compile time, regardless of
any nested inner eval-when's?  You know that I favor an implementaiton
of DEFMACRO that simply macroexpands onto usages of EVAL-WHEN, so that 
there is only *one* notion of toplevel "magic" --namlely eval-when.


-- JonL --