GNU bug report logs -
#48281
buffer_local_value and find_symbol_value duplicate functionality
Previous Next
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
Message #8 received at 48281 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> catern.com>
> Date: Fri, 07 May 2021 18:44:33 -0400
>
>
> find_symbol_value is described as:
>
> Find the value of a symbol, returning Qunbound if it's not bound.
>
> buffer_local_value does the same, except that it allows one to specify a
> buffer.
>
> Yet they both implement symbol lookup, without sharing code. And given
> that the comment above find_symbol_value says "Great care is required
> for this.", I'm guessing that one or both of them may have bugs that the
> other does not. Especially because buffer_local_value is simpler than
> find_symbol_value, despite doing an ostensibly more complicated job...
>
> How about unifying them into a single function? Would a patch doing
> that be accepted?
>
> Alternatively, maybe I'm missing some detail about why they're
> different?
First, such discussion is better conducted on emacs-devel, not here,
as some of the relevant people don't read the bug list. Adding
Stefan, who made extensive changes to both functions some 10 years
ago.
More to the point, I'm not sure I understand how you intend to
reconcile the differences in these two functions. They are similar,
but not identical. What is the plan for dealing with the differences?
Given that we can safely conflate the two implementations, I don't see
why we won't want to do that.
(The "great care" bit refers to the need to block quitting, btw, not
to the code as a whole.)
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.