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

From: "J.D. Smith" <[email-masked]>
Date: Wed, 30 Jul 2025 14:25:35 -0400

Michael Albinus <[email-masked]> writes:

> "J.D. Smith" <[email-masked]> writes:
>
> Hi,
>
>>> Tramp uses an own declare form `tramp-suppress-trace'. In order to make
>>> it happen, there's the code
>>
>> We are already adding the new declare form to
>> `macro-declarations-alist', but the problem is, this code will not
>> exist in Emacs <31.
>
> I meant to do this in tramp.el or tramp-compat.el

Aha.  One idea would be for tramp-compat to including something like:

    ;; Remove when Emacs >=31 is required
    (require 'loaddefs-gen)
    (cl-symbol-macrolet
        ((amac (alist-get 'autoload-macro macro-declarations-alist)))
      (unless amac (setq amac #'ignore)))   

to silence the warning, yet remain harmless once Emacs 31 is in the
wild.