all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* (fset 'nil 'message)
@ 2018-05-11  2:30 rslovers
  2018-05-11 12:39 ` Noam Postavsky
       [not found] ` <mailman.13637.1526042360.27995.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: rslovers @ 2018-05-11  2:30 UTC (permalink / raw)
  To: help-gnu-emacs

Greetings, emacs community:

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?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (fset 'nil 'message)
  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>
  1 sibling, 1 reply; 4+ messages in thread
From: Noam Postavsky @ 2018-05-11 12:39 UTC (permalink / raw)
  To: rslovers; +Cc: Help Gnu Emacs mailing list

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (fset 'nil 'message)
       [not found] ` <mailman.13637.1526042360.27995.help-gnu-emacs@gnu.org>
@ 2018-05-11 14:58   ` Barry Margolin
  0 siblings, 0 replies; 4+ messages in thread
From: Barry Margolin @ 2018-05-11 14:58 UTC (permalink / raw)
  To: help-gnu-emacs

[-- 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 ***


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (fset 'nil 'message)
  2018-05-11 12:39 ` Noam Postavsky
@ 2018-05-13  7:09   ` rslovers
  0 siblings, 0 replies; 4+ messages in thread
From: rslovers @ 2018-05-13  7:09 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, May 11, 2018 at 08:39:16AM -0400, Noam Postavsky wrote:
> 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

Thanks, appreciate the info.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-13  7:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.