[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: |
Lars Ingebrigtsen |
Subject: |
bug#44365: 27.1; intern-soft given a symbol never returns nil |
Date: |
Sun, 01 Nov 2020 14:19:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Robert Weiner <rsw@gnu.org> writes:
> If I first call intern-soft with the symbol-name of an unbound symbol,
> then it returns nil properly. But if I instead give intern-soft the
> symbol, it always returns the symbol rather than nil. Maybe it
> is because the internal call to symbol-name interns the symbol before it can
> test
> whether it is bound. Isn't this a bug?
So your test case is
(intern-soft 'does-not-exist)
?
That's not a valid use case for the function -- the reader will intern
`does-not-exist', and so the `intern-soft' call will just return the
interned symbol. The function is meant to be used like:
(intern-soft "does-not-exist")
So I'm closing this bug reprt.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no