[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (fset 'nil 'message)
From: |
Barry Margolin |
Subject: |
Re: (fset 'nil 'message) |
Date: |
Fri, 11 May 2018 10:58:28 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.13637.1526042360.27995.help-gnu-emacs@gnu.org>,
Noam Postavsky <npostavs@gmail.com> wrote:
> On 10 May 2018 at 22:30, <rslovers@yandex.com> wrote:
>
> > Today I accidentally ran (fset 'nil 'message), after that multiple
> > functions like forward-word, kill-word stopped working, and complained
> > that `Symbolâs function definition is void: nil'.
> >
> > After (fset 'nil 'nil) they started working again, does anybody undertand
> > what is going on here?
>
> Yes, after you do (fset 'nil 'message), (functionp nil) returns t, but
> (funcall nil) still fails. Many places do things like
>
> (when (functionp some-var)
> (funcall some-var))
>
> which will cause the errors you see if `some-var' is nil.
>
> In Emacs 26, doing (fset 'nil 'message) will fail (see Bug#25110).
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25110
This brings back memories. Several decades ago I worked for a company
that used Symbolics Lisp Machines, and one of our applications had a bug
that did something like (set 'nil <something>). This crashed the
operating system. Turns out that the software checked for this in SETQ,
but not SET.
Symbolics put the value cells of NIL and T into non-writable memory in
the next release.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***