From: Glenn Morris <rgm@gnu.org>
To: Philipp <p.stephani2@gmail.com>
Cc: 25166@debbugs.gnu.org
Subject: bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t
Date: Mon, 12 Dec 2016 15:25:44 -0500 [thread overview]
Message-ID: <1hpokwx5br.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <5f7f76ia4e.fsf@fencepost.gnu.org> (Glenn Morris's message of "Sun, 11 Dec 2016 13:38:57 -0500")
Glenn Morris wrote:
> Philipp wrote:
>
>> You can set the function cell of nil and t using `fset' and friends.
>> But you can't call the `nil' function using (nil) (it does work with
>> (t)). I think that attempting to set the function cell of nil and t is
>> almost always a bug -- probably the programmer wanted to set a real
>> symbol, but some of the constants got passed. I propose to signal an
>> error (e.g. `setting-constant') whenever the function cell of nil and t
>> is modified; maybe the same should happen for keywords.
>
> I just did this yesterday...
> See https://debbugs.gnu.org/25110, ba8e883, and 3fd4433.
And now see also ffb1302. :)
Anyway, I only did "nil", since as you say "t" can actually be called as
a function. But you are right that it's probably unintended.
next prev parent reply other threads:[~2016-12-12 20:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-11 9:41 bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t Philipp
2016-12-11 18:38 ` Glenn Morris
2016-12-12 20:25 ` Glenn Morris [this message]
2016-12-26 19:29 ` Philipp Stephani
2016-12-26 19:41 ` Philipp Stephani
2016-12-26 19:47 ` Eli Zaretskii
2016-12-27 15:15 ` Stefan Monnier
2016-12-27 22:49 ` Eli Zaretskii
2016-12-27 23:11 ` Stefan Monnier
2017-05-01 14:44 ` Philipp Stephani
2017-05-01 15:12 ` Eli Zaretskii
2017-10-27 17:59 ` Noam Postavsky
2017-10-28 16:16 ` Stefan Monnier
2017-10-28 16:45 ` Noam Postavsky
2017-10-29 18:10 ` Stefan Monnier
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=1hpokwx5br.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=25166@debbugs.gnu.org \
--cc=p.stephani2@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).