Subject: bug#48264: [PATCH v4 08/14] Remove unnecessary Qunbound check

From: Spencer Baugh <[email-masked]>
Date: Fri, 7 May 2021 22:08:59 -0400

DEFVAR_PER_BUFFER variables (which this function deals with) cannot be
Qunbound anymore.

* 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 1acf0fa724..04f60a4215 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1315,8 +1315,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.31.1