[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25166: 26.0.50; It shouldn't be possible to set the function cell of
From: |
Glenn Morris |
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 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
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.
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Philipp, 2016/12/11
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Glenn Morris, 2016/12/11
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t,
Glenn Morris <=
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Philipp Stephani, 2016/12/26
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Philipp Stephani, 2016/12/26
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Eli Zaretskii, 2016/12/26
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Stefan Monnier, 2016/12/27
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Eli Zaretskii, 2016/12/27
- bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t, Stefan Monnier, 2016/12/27