[iterate-devel] Iterate error with multiple-value-setq
Hoehle, Joerg-Cyril
Joerg-Cyril.Hoehle at t-systems.com
Tue Nov 30 10:20:06 UTC 2004
Stonewall Ballard wrote:
>I spent some time tracing the code, and found that multiple-value-bind
>is being expanded into multiple-value-bind-call because m-v-b is a
>macro. Perhaps it's not in other Lisps.
It is a macro in ANSI-CL.
>The first test in the cond of WALK (macro-function (car form) *env*)
>was true of m-v-b, so it dutifully expanded it and recursed.
I believe you missed part of my patch: the macro-function test is the *second* test my patched walk does, because it first checks for the special forms it knows how to handle:
((special-form? (car form)) ; handle known special operators first
(walk-special-form form))
((macro-function (car form) *env*)
(walk (macroexpand form *env*)))
Therefore, m-v-b should be handled by walk-special-form which then calls walk-m-v-b. macro-function would never be called upon '(m-v-b ...).
Could you try to trace both of these and see that they are indeed traversed?
There shouldn't be a need to add to *special-form-alist* because m-v-b is there! But it'll only be found if this list is tested first, not macro-function.
Regards,
Jorg Hohle.
More information about the iterate-devel
mailing list