On 04/22/2014 11:44 AM, Drew Adams wrote: >> That said, the CL way is much better. It's conceptually simpler to say >> that defmacro at toplevel is well-defined (progn contents being >> considered "toplevel") and everything else is undefined than to try to >> support this defmacro stuff in *all* contexts and run into the exciting >> corner inherent in your approach... > > Are you saying that in CL if defmacro is used elsewhere than at top level > it is not well-defined? That doesn't sound right to me. > > (Apologies if I misunderstand. If so, or if irrelevant, please ignore.) Compilers appear to differ. Consider the code below: (defun foo () (defmacro bar () 1) (bar)) (format t "~s" (foo)) SBCL and ECL both signal an error. CLISP compiles the file, substituting (bar) with 1, then complains when calling foo that bar is redefined. The SBCL and ECL behavior is what I'd expect from reading the spec, but maybe I misunderstood something.