GNU bug report logs - #48281
buffer_local_value and find_symbol_value duplicate functionality

Previous Next

Package: emacs;

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

Date: Fri, 7 May 2021 22:45:02 UTC

Severity: normal

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 48281 <at> debbugs.gnu.org, Spencer Baugh <sbaugh <at> catern.com>
Subject: bug#48281: buffer_local_value and find_symbol_value duplicate functionality
Date: Sat, 08 May 2021 09:26:31 -0400
>> find_symbol_value is described as:
[...]
>> buffer_local_value does the same, except that it allows one to specify a
>> buffer.
[...]
>> How about unifying them into a single function?  Would a patch doing
>> that be accepted?

Depends on the patch ;-)

>> Alternatively, maybe I'm missing some detail about why they're
>> different?

When I reworked that code I was annoyed by that difference but I had
enough other things to deal with that I didn't bother trying to
reconcile the two functions.

The thing that is important to know about those two functions is that
`find_symbol_value` is performance-critical, whereas
`buffer_local_value` is not.

So any effort to unify the two should focus on not slowing down
`find_symbol_value`.  The fact that here are two functions is acceptable
to me, but indeed the two code paths are uncomfortably different, so I'd
welcome changes (including minor changes) to make them more similar, tho
maybe the best we can do is add comments explaining why the two code
paths give the same result.


        Stefan





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

Previous Next


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