Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!rpi!crdgw1!betelgeuse!halvers From: halvers@betelgeuse.crd.ge.com (Pete Halverson) Newsgroups: comp.lang.lisp Subject: Re: Message-ID: <13279@crdgw1.crd.ge.com> Date: 31 Oct 90 13:28:03 GMT References: <1990Oct30.225047.17818@ux1.cso.uiuc.edu> Sender: news@crdgw1.crd.ge.com Reply-To: halverson@crd.ge.com (Pete Halverson) Organization: General Electric Corporate R&D Center Lines: 18 In article <1990Oct30.225047.17818@ux1.cso.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. Using progn is the accepted way to handle macros with multiple forms. In CLtL.1, Steele said that "if a progn form appears at a top level, then all forms within that progn are considered by the compiler to be top-level forms". Furthermore, in the latest version, apparently "compilers must handle defining forms properly in *all* situations, not just top-level contexts" [emphasis added]. -- =============================================================================== Pete Halverson INET: halverson@crd.ge.com GE Corporate R&D Center UUCP: uunet!crd.ge.com!halverson Schenectady, NY "Money for nuthin' and your MIPS for free"