Subject: Re: macroexpand why
From: rpw3@rpw3.org (Rob Warnock)
Date: Tue, 14 Aug 2007 21:25:09 -0500
Newsgroups: comp.lang.lisp
Message-ID: <VN6dnbMj2rSY-V_bnZ2dnUVZ_gKdnZ2d@speakeasy.net>
Geoff Wozniak  <geoff.wozniak@gmail.com> wrote:
+---------------
| If you aren't using Slime, you can call some no-so-well-known
| functions.  In SBCL, this is SB-WALKER:WALK-FORM, but in order for it
| to work the way you want, you must set/bind SB-WALKER:*WALK-FORM-
| EXPAND-MACROS-P* to T.
| 
|   (let ((sb-walker:*walk-form-expand-macros-p* t))
|     (sb-walker:walk-form '(defun foo (x) (+ x x))))
| 
| In Allegro CL, it's EXCL::WALK.
| 
| In LispWorks Personal 5.0.1, look at the Expression > Walk and
| Expression > Macroexpand menu options (be sure to place the cursor at
| the beginning of the form.
+---------------

In CMUCL, the parent of SBCL, it's WALKER:MACROEXPAND-ALL.


-Rob

p.s. But they're not really all that different, since
WALKER:MACROEXPAND-ALL is defined as follows:  ;-}  ;-}

    (defun walker:macroexpand-all (form &optional environment)
      (let ((walker:walk-form-expand-macros-p t))
	  (walker:walk-form form environment)))

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607