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

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

bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to


From: Noam Postavsky
Subject: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27
Date: Thu, 12 Mar 2020 20:43:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Maxim Cournoyer <address@hidden> 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.

Attachment: bug-39823-autoload-regression.el
Description: File for demonstration

See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for
(much) more discussion on this.




reply via email to

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