[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
- [PATCH 03/10] Use bset_last_selected_window everywhere, (continued)
- [PATCH 03/10] Use bset_last_selected_window everywhere, Spencer Baugh, 2020/11/19
- [PATCH 01/10] Take buffer field name in DEFVAR_PER_BUFFER, Spencer Baugh, 2020/11/19
- [PATCH 06/10] Disallow using BVAR as an lvalue, Spencer Baugh, 2020/11/19
- [PATCH 09/10] Access buffer_defaults in BVAR if there's no local binding, Spencer Baugh, 2020/11/19
- Re: [PATCH 09/10] Access buffer_defaults in BVAR if there's no local binding, Stefan Monnier, 2020/11/19
- Re: [PATCH 09/10] Access buffer_defaults in BVAR if there's no local binding, Eli Zaretskii, 2020/11/19
- [PATCH 05/10] Add BVAR_DEFAULT for access to buffer defaults, Spencer Baugh, 2020/11/19
- [PATCH 08/10] Make cache_long_scans buffer-local when setting it, Spencer Baugh, 2020/11/19
- [PATCH 07/10] Reorder buffer.h for upcoming rework of BVAR, Spencer Baugh, 2020/11/19
- [PATCH 10/10] Don't iterate over all buffers in set_default_internal, Spencer Baugh, 2020/11/19
- Re: [PATCH 10/10] Don't iterate over all buffers in set_default_internal,
Stefan Monnier <=