emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: generator documentation improvement


From: Paul Pogonyshev
Subject: Re: generator documentation improvement
Date: Sat, 11 Mar 2017 22:10:34 +0100

> Are sure that "iter-yield [...] cannot appear inside [...] dynamic let
> bindings" is the intended behavior ?

No, I just assumed it was related.  I noticed weird behaviour in
real code and managed to pinpoint it to let-binding global variables.
Local (lexical scope) bindings are not a problem. I guessed that
global variable binding are in some sense similar to `unwind-protect',
since no matter how you exit body of `let' (normally or with an error),
previous value must be restored.

If it is not intended and can be fixed, then of course the
documentation patch is not needed.

Paul

On 8 March 2017 at 22:28, Andreas Politz <address@hidden> wrote:
> Noam Postavsky <address@hidden> writes:
>
>> Is this Bug#25965 "iter-lambda may evaluate certain forms twice"?
>>
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25965
>
> Yes, it is.
>
> Are sure that "iter-yield [...] cannot appear inside [...] dynamic let
> bindings" is the intended behavior ? There is special code in
> generator.el handling these dynamic bindings, which I think is just
> incorrect.
>
> -ap



reply via email to

[Prev in Thread] Current Thread [Next in Thread]