unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48281: buffer_local_value and find_symbol_value duplicate functionality
@ 2021-05-07 22:44 Spencer Baugh
  2021-05-08  7:10 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Spencer Baugh @ 2021-05-07 22:44 UTC (permalink / raw)
  To: 48281


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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-02 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 22:44 bug#48281: buffer_local_value and find_symbol_value duplicate functionality Spencer Baugh
2021-05-08  7:10 ` Eli Zaretskii
2021-05-08 13:26   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-02 13:22     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).