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

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 08 Apr 2020 12:41:26 -0400

Hi Eli,

Eli Zaretskii <[email-masked]> writes:

>> From: Maxim Cournoyer <[email-masked]>
>> Date: Tue, 07 Apr 2020 23:55:18 -0400
>> Cc: [email-masked], [email-masked]
>> 
>> I think it could be nice to update update-directory-autoloads to work in
>> a lexical setting before closing this bug, though.
>
> Update how?

Update `update-directory-autoloads' so that it accepts a &key style arg
for the ‘generated-autoload-file’ file name.  Currently it must be
dynamically bound prior to calling `update-directory-autoloads'.  This
was discussed earlier in this thread (see:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39823#29).

> This discussion mentioned a way to turn off lexical-binding in --eval
> command-line arguments (which is also in NEWS), so why do we need to
> do anything else specifically for update-directory-autoloads?

Because I suspect that 'update-directory-autoloads' is probably used
most of the time with the command line --eval (in Makefiles and build
scripts), and that the wrap in eval workaround, while it works, is
rather obscure.

Maxim