emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 10/10] Don't iterate over all buffers in set_default_internal


From: Stefan Monnier
Subject: Re: [PATCH 10/10] Don't iterate over all buffers in set_default_internal
Date: Thu, 19 Nov 2020 13:21:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> More complex is the change to set_internal.
> Previously, if we were in the following scenario, which we'll refer to
> as scenario A:
> - We are in the scope of a let_default binding for some variable,
> - the current buffer is the buffer which created that let binding,
> - and we call setq for that variable.
> The variable would not become buffer-local after the setq, because of
> this check in set_internal.  But, nevertheless, the value we'd see for
> the variable would still appear different in the current buffer from
> other buffers. See the first, minor bug mentioned in bug#44733.

See my comment there.
The bug is real, but I think your patch "fixes" in an incorrect way.

> The old behavior of let_default is that if we setq in a buffer other
> than the one which created the let_default binding, our binding
> wouldn't be unwound after the let_default was done.  But if we setq in
> the buffer that created the let_default binding (that is, in scenario
> A) then that binding would be unwound.

If you can add tests for these subtleties at the same time as (or
before) these patches, that would be very helpful.


        Stefan




reply via email to

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