help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (fset 'nil 'message)


From: Noam Postavsky
Subject: Re: (fset 'nil 'message)
Date: Fri, 11 May 2018 08:39:16 -0400

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]