From: Douglas K. <do...@go...> - 2014-08-02 16:34:35
|
I don't like anything that changes what macroexpand-all means. It should mean *really* macroexpand-all. The use that needs to be distinguished here is that within Slime doing (its equivalent of) macroexpand-all, notwithstanding certain forms being macro, you want to recursively walk subforms and plug the walked results back into the original call. This generalizes nicely - I've often wanted slime-macroexpand-all to just show how all of *my* macros expand, but treat DOTIMES as semi-opaque in that it must expand hair in COUNT and RESULT forms and body, but otherwise show the form as a DOTIMES. "macroexpand-all-except-quasiquote" should be (macroexpand-all-except '(some things) ..) which would have hooks that allow teaching it how to expand only the innards of some things, one being QUASIQUOTE. The patch I previously included is just a sketch of how easy this is for QUASIQUOTE. It would be even shorter if the walk were allowed to simply stop at any QUASIQUOTE and return the form unchanged. I'm wasn't sure whether people would find that more useful or less useful. The reason I think this is just for Slime is that if we support a macro for 3rd-party walkers anyway, that macro is going to be exactly what it is now already: `(foo ,bar) -> (list 'foo bar) - what else? |