> Attila Lendvai wrote: > >(in fact it calls macroexpand with nil env, i think). > No, it doesn't. > >this won't be quickly fixed, but corrent me if i'm wrong. > No macro should call macroexpand with the nil env. That's completely wrong, > in most cases. Iterate properly uses the env parameter. The env parameter > is there for a purpose.
i was too hasty to answer misinformation, not to mention not reading the other threads first, where the discussion continued. sorry for that. > What Iterate (and many others) cannot handle properly is local definitions > within its body, e.g. > (Iterate (macrolet (flet ...))) > It serves nothing if Iterate would keep an internal list of local functions > or macros, as it cannot communicate this list (i.e. environment) to other > macros. That's why CLtL2 had AUGMENT-ENVIRONMENT. > Alas, why CLtL2's environment API is not good enough is really complicated. > BTW, *MACROEXPAND-HOOK* is of no help either. hm, i don't have too much knowledge about environment augmentation, but the code walker (call/cc stuff) in arnesi does seem to work. you can have a peek at lexenv.lisp, but it seems to be only a subset of the CLtL2 api, so it's probably not much help then. hth anyway, -- attila _______________________________________________ iterate-devel site list iterate-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/iterate-devel