GNU bug report logs - #25166
It shouldn't be possible to set the function cell of t

Previous Next

Package: emacs;

Reported by: Philipp <p.stephani2 <at> gmail.com>

Date: Sun, 11 Dec 2016 09:47:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 26.0.50

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25166 <at> debbugs.gnu.org, Philipp Stephani <p.stephani2 <at> gmail.com>
Subject: bug#25166: 26.0.50; It shouldn't be possible to set the function cell of nil and t
Date: Sat, 28 Oct 2017 12:45:57 -0400
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> PS for an example of why singling out nil makes sense (but this
>> doesn't apply to t) see [1].
>> Summary: (autoload #'nil "something" nil t) silently succeeds but
>> makes forward-word, backward-word, etc, (fail to) funcall nil.
>
> Why would someone do (autoload #'nil "something" nil t) ?

By accident.  It's a bug in use-package.

    (use-package foo-pkg :commands <commands-to-autoload>)

Creates autoloads for all the commands in <commands-to-autoload>, which
can be a symbol, or a list of symbols.  But nil is also a symbol, so
passing an empty list makes an autoload for nil (because use-package
checks for symbolp before listp), rather than making autoloads for 0
commands.





This bug report was last modified 7 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.