Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!mit-eddie!mintaka!yale!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.lang.lisp Subject: Macro expanding into multiple forms Message-ID: <1990Oct31.010958.28374@Think.COM> Date: 31 Oct 90 01:09:58 GMT References: <1990Oct30.225047.17818@ux1.cso.uiuc.edu> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 15 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