[comp.lang.lisp] Macro expanding into multiple forms

barmar@think.com (Barry Margolin) (10/31/90)

In article <1990Oct30.225047.17818@ux1.cso.uiuc.edu> carroll@cs.uiuc.edu (Alan M. Carroll) writes:
>What is the best way to have a macro expand to more than 1 top-level form in
>CommonLisp? Right now I use something like `(progn form1 form2 ...), but I
>worry that since the forms aren't actually at the top level in the file,
>they might not be processed/compiled/etc. correctly.

That is the correct way to do it.  See the last sentence of p.83 of CLtL
2nd Edition: "As a special case, however, if a PROGN form appears at top
level, then all forms within that PROGN are considered by the compiler to
be top-level forms."
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar