Newsgroups: comp.lang.lisp Path: utzoo!utgpu!watserv1!watmath!att!att!pacbell.com!decwrl!wuarchive!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!cdr.utah.edu!moore From: moore%cdr.utah.edu@cs.utah.edu (Tim Moore) Subject: Date: 30 Oct 90 16:26:08 MST Message-ID: <1990Oct30.162608.20530@hellgate.utah.edu> Organization: University of Utah CS Dept References: <1990Oct30.225047.17818@ux1.cso.uiuc.edu> In article <1990Oct30.225047.17818@ux1.cso.uiuc.edu> carroll@cs.uiuc.edu (Alan M. Carroll) writes: >A very basic question from a non-expert Lisper: > >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. What I want to accomplish >is to have macros that set up read/writers in CLOS automatically (I have large >numbers of almost identical ones, only the class name / slot names change). PROGN will work fine for what you want. If a progn is seen at top level, the forms of the progn are processed as if they are at top level too. Tim Moore moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore "Ah, youth. Ah, statute of limitations." -John Waters