[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/7] Remove unnecessary Qunbound check
From: |
Spencer Baugh |
Subject: |
[PATCH 7/7] Remove unnecessary Qunbound check |
Date: |
Tue, 23 Mar 2021 23:11:57 -0400 |
DEFVAR_PER_BUFFER variables (which this function deals with) cannot be
Qunbound, at least right now; they're either set to a value, or
PER_BUFFER_VALUE_P is false.
* src/buffer.c (buffer_local_variables_1): Remove Qunbound check
---
src/buffer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/buffer.c b/src/buffer.c
index 563e5b7180..a1555c729c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1323,8 +1323,7 @@ buffer_local_variables_1 (struct buffer *buf, int offset,
Lisp_Object sym)
&& SYMBOLP (PER_BUFFER_SYMBOL (offset)))
{
sym = NILP (sym) ? PER_BUFFER_SYMBOL (offset) : sym;
- Lisp_Object val = per_buffer_value (buf, offset);
- return EQ (val, Qunbound) ? sym : Fcons (sym, val);
+ return Fcons (sym, per_buffer_value (buf, offset));
}
return Qnil;
}
--
2.28.0
- [PATCH 0/7] Cleanups and tests for DEFVAR_PER_BUFFER variables, Spencer Baugh, 2021/03/23
- [PATCH 3/7] Stop checking the constant default for enable_multibyte_characters, Spencer Baugh, 2021/03/23
- [PATCH 4/7] Take buffer field name in DEFVAR_PER_BUFFER, Spencer Baugh, 2021/03/23
- [PATCH 2/7] Assert not local-variable-p after setq in let_default binding, Spencer Baugh, 2021/03/23
- [PATCH 1/7] Add a test for let-binding unwinding, Spencer Baugh, 2021/03/23
- [PATCH 6/7] Assert that PER_BUFFER_IDX for Lisp variables is not 0, Spencer Baugh, 2021/03/23
- [PATCH 5/7] Combine unnecessarily separate loops in buffer.c, Spencer Baugh, 2021/03/23
- [PATCH 7/7] Remove unnecessary Qunbound check,
Spencer Baugh <=
- Re: [PATCH 0/7] Cleanups and tests for DEFVAR_PER_BUFFER variables, Eli Zaretskii, 2021/03/24