bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44365: 27.1; intern-soft given a symbol never returns nil


From: Philipp Stephani
Subject: bug#44365: 27.1; intern-soft given a symbol never returns nil
Date: Sun, 1 Nov 2020 15:31:49 +0100

Am So., 1. Nov. 2020 um 15:10 Uhr schrieb Lars Ingebrigtsen <larsi@gnus.org>:
>
> Robert Weiner <rsw@gnu.org> writes:
>
> > "Return the canonical symbol named NAME, or nil if none exists.
> > NAME may be a string or a symbol.  If it is a symbol, that exact
> > symbol is searched for."
> >
> > So, the doc string must need changing if your view is correct.
>
> No, it's talking about searching for a symbol in a different obarray, I
> think (the second argument to intern-soft):
>
> (intern-soft 'foo other-obarray)

I don't think this can ever return non-nil (assuming other-obarray is
a separate obarray from the default one), as the reader interns
symbols in the default obarray, so the symbol isn't found in the other
obarray:

(let ((other-obarray (make-vector 10 nil)))
  (list (intern-soft 'foo other-obarray)
        (intern "foo" other-obarray)
        (intern-soft 'foo other-obarray)))
=> (nil foo nil)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]