[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 20 Mar 2017 09:25:01 -0400
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
>> I'm wondering why generator.el uses cl-symbol-macrolet like that
> Because that's how it works. It needs to store variables in an outer
> scope so that their values are preserved between calls to `iter-next'
> on the same iterator. Therefore it "rebinds" local variables to
> different symbol and declares those symbols in outer scope, so that
> they become non-local variables captured by resulting closures.
Could you give me some concrete (but simple) example?
> bug in in `cl-symbol-macrolet' that incorrectly applies `bindings' to
> forms with lambdas.
Yes, I understand this part of the problem (and fixing it should
actually be easier than for `let` since in lexical-binding mode, all
lambda args are lexically scoped, regardless of special-variable-p).
[ Note: I haven't looked at your suggested patch, but I agree with your
problem&solution description so your patch is probably right. ]