Sam Steingold wrote:
>
> I know of macroexpand and macroexpand-1, but they do macroexpansion only
> for the top-level macro. E.g.:
>
> (macroexpand '(macro1 (macro2) (macro3)))
> => (something-to-which-macro1-finally-expands (macro2) (macro3))
This provides a good way to make a functional test against the macro.
>
> Is there a simple way to recursively macroexpand a form? Like:
>
> (macroexpand-r '(macro1 (macro2) (macro3)))
> => (something-to-which-macro1-finally-expands
> (something-to-which-macro2-finally-expands)
> (something-to-which-macro3-finally-expands))
The answers posted to the newsgroup show the numerous problems
you'll get to do that.
Now, my question: do you have a good reason to want that?
I mean: will this reason be good enough compared to the
problems it leads to?
I'm just curious.
--
| # # | # # # | # # | # # # | # # | # # # | Jacques Duthen |
| # # | # # # | # # | # # # | # # | # # # | ······@club-internet.fr |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|