emacs-devel
[Top][All Lists]
Advanced

[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




reply via email to

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