From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <5f7f76ia4e.fsf@fencepost.gnu.org> <1hpokwx5br.fsf@fencepost.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114706940c5edd054494c1f1 X-Trace: blaine.gmane.org 1482780616 26558 195.159.176.226 (26 Dec 2016 19:30:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Dec 2016 19:30:16 +0000 (UTC) Cc: 25166@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 26 20:30:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLayI-00068R-HI for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Dec 2016 20:30:10 +0100 Original-Received: from localhost ([::1]:51468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLayL-0000WF-Ns for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Dec 2016 14:30:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLayE-0000UJ-3v for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2016 14:30:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLayB-0000KO-3D for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2016 14:30:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40552) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cLayA-0000K8-W5 for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2016 14:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cLayA-0005qg-KS for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2016 14:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Dec 2016 19:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25166 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25166-submit@debbugs.gnu.org id=B25166.148278057622417 (code B ref 25166); Mon, 26 Dec 2016 19:30:02 +0000 Original-Received: (at 25166) by debbugs.gnu.org; 26 Dec 2016 19:29:36 +0000 Original-Received: from localhost ([127.0.0.1]:55951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLaxj-0005pU-NZ for submit@debbugs.gnu.org; Mon, 26 Dec 2016 14:29:35 -0500 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:36659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLaxi-0005pG-0q for 25166@debbugs.gnu.org; Mon, 26 Dec 2016 14:29:34 -0500 Original-Received: by mail-wm0-f45.google.com with SMTP id c85so63796790wmi.1 for <25166@debbugs.gnu.org>; Mon, 26 Dec 2016 11:29:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ch19O+ziUl3dIKA5UwckPkr15lSiwTnc36UAk103BAU=; b=DZv2GrQzq8DLNkzXwtXlui/7F41zVENFHZtIzZ55QtubwqjlO6DtW8WpflI0sMU3Mv vDRx/6O3SDSo7ioRjfylkoqnAQEHRedPFcgyenPCgEoYipYiUJmakCZVCl7Xo7ly7/IP N497kvG4TsxlxI2p2iKGq+hmNdEQEn9mhZPu3RCHWIAK+IvXTke4E78seBWyefSxYPF2 ktb1D/zyp5uEy9dhphU9t3ug+yQD14E+2Tz/2RgvojZDFTRu1GwpY6FPHxpQK6HzslRa CO+z7FOXYZRfHYW1BIgTL1ezkMT+GfsVKkZLQeqYwkGtPxVX9IEbb0BDSfT6CIy5QbJg OIdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ch19O+ziUl3dIKA5UwckPkr15lSiwTnc36UAk103BAU=; b=GzQ2AEdYpaKZzjzyH0Vs8yP/wJ+55eol2CVarzxGQVHvbWA3JXOKQhrhL03NlobnWp 8Gc2ukSFiyLPqxyblLla35HUt8+4hX3w436MZi4OhH70qjEtyxNVKfUH0k+Vvwq2pTRB sc2lwZSNixXugNqdVzp94eHb+Ok8AZRswFl1v8ADpfl0JZrzyFMH8suyzUDjCI8cphGO my266FdjGEA4h0JrRdkMdYN3LFU14U/2MjyXBZqc6RUCPvErcHQpPnBLFMPaKZioaaBa fs2fo/zYZrxBcAj+wQB44eHmz/4u0xL5+KQy2L+sFRpYIXkch6zPpjdyVI88al9JjbZU Jt8Q== X-Gm-Message-State: AIkVDXIoh7oCRyexs3fDyYZEzcROweozEMjlXvw5jSevsxt59vvBIs5q0PLKyPssMs+IorXnbD13B1D0mja/Tw== X-Received: by 10.28.216.65 with SMTP id p62mr25717282wmg.92.1482780568213; Mon, 26 Dec 2016 11:29:28 -0800 (PST) In-Reply-To: <1hpokwx5br.fsf@fencepost.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127458 Archived-At: --001a114706940c5edd054494c1f1 Content-Type: text/plain; charset=UTF-8 Glenn Morris 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. --001a114706940c5edd054494c1f1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Glenn = Morris <rgm@gnu.org> schrieb am Mo= ., 12. Dez. 2016 um 21:25=C2=A0Uhr:
Glenn Morris wrote:

> Philipp wrote:
>
>> You can set the function cell of nil and t using `fset' and fr= iends.
>> But you can't call the `nil' function using (nil) (it does= work with
>> (t)).=C2=A0 I think that attempting to set the function cell of ni= l and t is
>> almost always a bug -- probably the programmer wanted to set a rea= l
>> symbol, but some of the constants got passed.=C2=A0 I propose to s= ignal 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 actu= ally be called as
a function. But you are right that it's probably unintended.


Thanks! Interestin= gly the behavior was already added in 1994 (commit c15c5d408d696928862ca284= 8a359231e373556c), but apparently reverted later. I'd suggest to simply= reinstate that commit.=C2=A0
--001a114706940c5edd054494c1f1--