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


View this message in rfc822 format

From: Spencer Baugh <sbaugh <at> catern.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 48264 <at> debbugs.gnu.org
Subject: bug#48264: [PATCH v3 03/15] Add and use BUFFER_DEFAULT_VALUE_P
Date: Fri, 07 May 2021 10:30:51 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Spencer Baugh <sbaugh <at> catern.com>
>> Cc: 48264 <at> debbugs.gnu.org
>> Date: Fri, 07 May 2021 09:38:20 -0400
>> 
>> > It's the other way around here: the test "if (idx > 0)" is clear,
>> > whereas "if (BUFFER_DEFAULT_VALUE_P (offset))" makes me go look up the
>> > definition of the macro, because the name is not expressive enough,
>> > and the argument "offset" doesn't help, either.
>> 
>> Sure; what about the name "BUFFER_VAR_HAS_DEFAULT_VALUE_P"?
>
> Much better.  Maybe BVAR_HAS_DEFAULT_VALUE_P? it's shorter.

Will change to that - with that change, is this patch fine, or would you
still prefer comments on the usage sites?




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.