GNU bug report logs - #48264
28.0.50; Changing the default for DEFVAR_PER_BUFFER variables takes O(#buffers) time

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> catern.com>

Date: Thu, 6 May 2021 20:25:01 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #29 received at 48264 <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> catern.com>
To: 48264 <at> debbugs.gnu.org
Cc: Spencer Baugh <sbaugh <at> catern.com>
Subject: [PATCH v3 09/15] Remove unnecessary Qunbound check
Date: Thu,  6 May 2021 17:33:40 -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 b9ac93c5e8..e6b7cd9aa8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1316,8 +1316,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





This bug report was last modified 2 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.