Subject: Re: bug#78995: [PATCH] ;;;autoload-expand for special macros

From: Michael Albinus <[email-masked]>
Date: Sun, 27 Jul 2025 09:12:24 +0200

"J.D. Smith" <[email-masked]> writes:

Hi,

>> BTW, in the specific case of Tramp, I see:
>>
>>     (defmacro tramp--with-startup (&rest body)
>>       "Schedule BODY to be executed at the end of tramp.el."
>>       `(add-hook 'tramp--startup-hook (lambda nil ,@body)))
>>
>> so I think `tramp--with-startup` *is* one of the macros that would
>> benefit from your new `(autoload macro-expand)` declaration.
>
> Ah right, my imagining above was not so misguided then.  Maybe the tramp
> maintainer will want to expand that simple macro away now.

I give this explanation to Stefan, he added this macro to Tramp years
ago (commit 07d8827946f9) :-)

--8<---------------cut here---------------start------------->8---
    Functionally split tramp-loaddefs.el into two parts: one part run
    while loading it at the very beginning of loading tramp.el (holding plain
    autoloads and declarations), and another run at the very end of loading
    tramp.el (holding setup code).
    This should reduce infinite-recursion problems while loading.
--8<---------------cut here---------------end--------------->8---

See also bug#59194, which waits for me understanding what to do.

Best regards, Michael.