GNU bug report logs - #39823
26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27

Previous Next

Package: emacs;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 28 Feb 2020 15:13:02 UTC

Severity: normal

Tags: fixed

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 39823 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: , 39823 <at> debbugs.gnu.org
Subject: Re: bug#39823: 26.3;
 update-directory-autoloads regression from Emacs 26 to Emacs 27
Date: Thu, 12 Mar 2020 20:43:09 -0400
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> After passing from Emacs 26 to Emacs 27, the following snippet of code
> doesn't behave the same:
>
> emacs --quick --batch --eval "(progn
>  ;(require 'autoload)
>  (let ((backup-inhibited t)
>        (generated-autoload-file \"/tmp/toto\"))
>    (update-directory-autoloads \"/tmp\")))"
>
>
> Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message:
>
> Wrong type argument: stringp, nil

The difference is that --eval now evaluates with lexical-binding
enabled, so the let-binding of generated-autoload-file is lexical unless
autoload.el, with its (defvar generated-autoload-file nil ...), has been
loaded.  Another way to demonstrate this:

    emacs -Q --batch -l bug-39823-autoload-regression.el

fails with the same error, with bug-39823-autoload-regression.el as the
attached file in both Emacs 26 and 27.  Remove the lexical-binding
setting, and it succeeds in both.

[bug-39823-autoload-regression.el (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for
(much) more discussion on this.




This bug report was last modified 4 years and 283 days ago.

Previous Next


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