From: Philipp Stephani <p.stephani2@gmail.com>
To: Glenn Morris <rgm@gnu.org>
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, 26 Dec 2016 19:29:17 +0000 [thread overview]
Message-ID: <CAArVCkS990mMYOQMks5qA9TX_cV2UfoyJ2KXeLxLi+dZZsOsyA@mail.gmail.com> (raw)
In-Reply-To: <1hpokwx5br.fsf@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
Glenn Morris <rgm@gnu.org> schrieb am Mo., 12. Dez. 2016 um 21:25 Uhr:
> 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.
>
>
Thanks! Interestingly the behavior was already added in 1994 (commit
c15c5d408d696928862ca2848a359231e373556c), but apparently reverted later.
I'd suggest to simply reinstate that commit.
[-- Attachment #2: Type: text/html, Size: 1966 bytes --]
next prev parent reply other threads:[~2016-12-26 19:29 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
2016-12-26 19:29 ` Philipp Stephani [this message]
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=CAArVCkS990mMYOQMks5qA9TX_cV2UfoyJ2KXeLxLi+dZZsOsyA@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=25166@debbugs.gnu.org \
--cc=rgm@gnu.org \
/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).