From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: (fset 'nil 'message)
Date: Fri, 11 May 2018 10:58:28 -0400 [thread overview]
Message-ID: <barmar-03DEEC.10582411052018@reader.eternal-september.org> (raw)
In-Reply-To: mailman.13637.1526042360.27995.help-gnu-emacs@gnu.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]
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 ***
prev parent reply other threads:[~2018-05-11 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 2:30 (fset 'nil 'message) rslovers
2018-05-11 12:39 ` Noam Postavsky
2018-05-13 7:09 ` rslovers
[not found] ` <mailman.13637.1526042360.27995.help-gnu-emacs@gnu.org>
2018-05-11 14:58 ` Barry Margolin [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=barmar-03DEEC.10582411052018@reader.eternal-september.org \
--to=barmar@alum.mit.edu \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.