From: Lars Ingebrigtsen <larsi@gnus.org>
To: Robert Weiner <rsw@gnu.org>
Cc: rswgnu@gmail.com, 44365@debbugs.gnu.org
Subject: bug#44365: 27.1; intern-soft given a symbol never returns nil
Date: Sun, 01 Nov 2020 14:19:14 +0100 [thread overview]
Message-ID: <87blghcizx.fsf@gnus.org> (raw)
In-Reply-To: <CA+OMD9jN95-imoQGLR_0GvS2mxSYaDBU0_VJt9mBfHXLXeArcg@mail.gmail.com> (Robert Weiner's message of "Sun, 1 Nov 2020 01:04:17 -0400")
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
next prev parent reply other threads:[~2020-11-01 13:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 5:04 bug#44365: 27.1; intern-soft given a symbol never returns nil Robert Weiner
2020-11-01 13:19 ` Lars Ingebrigtsen [this message]
2020-11-01 13:55 ` Robert Weiner
2020-11-01 14:09 ` Lars Ingebrigtsen
2020-11-01 14:27 ` Philipp Stephani
2020-11-01 14:31 ` Philipp Stephani
2020-11-01 14:20 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blghcizx.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=44365@debbugs.gnu.org \
--cc=rsw@gnu.org \
--cc=rswgnu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).