Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!phoenix!eliot From: eliot@phoenix.Princeton.EDU (Eliot Handelman) Newsgroups: comp.lang.lisp Subject: Re: macroexpanding macrolets Message-ID: <4065@idunno.Princeton.EDU> Date: 15 Nov 90 02:58:49 GMT References: <4049@idunno.Princeton.EDU> <8880@pasteur.Berkeley.EDU> <1990Nov14.135322.7677@hellgate.utah.edu> Sender: news@idunno.Princeton.EDU Organization: Shitson University, New Crapsey Lines: 20 In article <1990Nov14.135322.7677@hellgate.utah.edu> moore%cdr.utah.edu@cs.utah.edu (Tim Moore) writes: ;In article <8880@pasteur.Berkeley.EDU> maverick@fir.Berkeley.EDU (Vance Maverick) writes: ;>In article <4049@idunno.Princeton.EDU>, eliot@phoenix.Princeton.EDU ;>(Eliot Handelman) writes: ;>> I need a function that macroexpands locally-defined macros (via MACROLET) ;>> -- is there some way to do this in plain CL? If not, has anyone hacked ;>such a ;>> tool in KCL? Am I right in thinking that the optional environment to ;>> MACROEXPAND is the way to go? ;> ;>Yes, according to CLtL. But how do you get the Lisp object representing ;>an environment? ; ;By using the &environment argument to macros. In answer to my own question, a function containing macrolets can be expanded using the pcl portable code walker like this (as pointed out to me by Chris Richardson of Franz): (pcl::walk-form form)