Subject: Re: bug#79353: 31.0.50; Eager macro expansion errors when building master

From: "J.D. Smith" <[email-masked]>
Date: Sun, 31 Aug 2025 13:43:57 -0400

Gerd Möllmann <[email-masked]> writes:

> "J.D. Smith" <[email-masked]> writes:
>
>> *Question*:
>>
>> In the lisp/net/tramp-loaddefs.el file which was generated during this
>> build, what do you see under:
>>
>>   ;;; Generated autoloads from tramp-adb.el
>
> This is the tramp-loaddefs.el after building from git clean -xdf
>
>
>
>> Can you try a build again with `make bootstrap' and see whether the
>> warning disappears and if that section of lisp/net/tramp-loaddefs.el
>> changes?  My guess is this is a harmless warning.
>
> The errors are the same, and here's tramp-loaddefs.el after bootstrap

Thanks for checking.  These files are identical, and the error is
preventing tramp--with-startup from getting defined during autoload
generation, so autoloaded calls to it just get inlined as-is in
tramp-loaddefs.el.  If it were working as intended, most of those would
be replaced by `add-hook'.

Gerd, do you mind reverting e9800cabffa and seeing what if anything
changes (from a clean start)?  Probably nothing.

BTW, Stefan and Michael, I see that tramp actually autoloads more
complicated forms using `tramp--with-startup', e.g.:

 (when (featurep 'dbusbind)
   (tramp--with-startup ...))

which means the macro definition still needs to be included in the
autoload file as well.  For consistency, maybe it makes the best sense
NOT to delcare autoload-macro expand in tramp--with-startup.  Thoughts?