[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/10] Make cache_long_scans buffer-local when setting it
From: |
Spencer Baugh |
Subject: |
[PATCH 08/10] Make cache_long_scans buffer-local when setting it |
Date: |
Thu, 19 Nov 2020 10:38:12 -0500 |
If we set a value for a variable on some buffer, it necessarily means
that that value is buffer-local - it might be, and probably is,
different from what's in buffer_defaults.
Without further changes, I think this has no effect. But it's required
for correct behavior when we change BVAR to fall back to
buffer_defaults for non-buffer-local variables; without this change,
we would always use buffer_defaults for cache_long_scans even though
it's been set in a per-buffer way.
---
src/buffer.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/buffer.h b/src/buffer.h
index 6e384640b7..077edb893a 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -863,6 +863,7 @@ INLINE void
bset_cache_long_scans (struct buffer *b, Lisp_Object val)
{
b->cache_long_scans_ = val;
+ SET_PER_BUFFER_VALUE_P (b, PER_BUFFER_VAR_IDX(cache_long_scans), 1);
}
INLINE void
bset_case_canon_table (struct buffer *b, Lisp_Object val)
--
2.28.0
- Re: [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER, (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 <=
- [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, 2020/11/19