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

From: Michael Albinus <[email-masked]>
Date: Wed, 30 Jul 2025 17:44:15 +0200

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

Hi,
>> Before doing so, I've tried Stefan's patch with Emacs 28. There are
>> compilation warnings.
>>    ...
>> And also at runtime.
>
> That would seem to make it difficult to add new declare forms and
> simultaneously support older versions of Emacs.  How have such issues
> been dealt with in the past?  Do you have a version or branch of TRAMP
> that is only deployed on master?

No, there's only one Tramp branch, which is deployed on master and on
GNU ELPA.

Tramp uses an own declare form `tramp-suppress-trace'. In order to make
it happen, there's the code

--8<---------------cut here---------------start------------->8---
(eval-and-compile
  (defalias 'tramp-byte-run--set-suppress-trace
    #'(lambda (f _args val)
	(list 'function-put (list 'quote f)
	      ''tramp-suppress-trace val)))

  (add-to-list
   'defun-declarations-alist
   (list 'tramp-suppress-trace #'tramp-byte-run--set-suppress-trace))))
--8<---------------cut here---------------end--------------->8---

Perhaps this trick could be used?

Best regards, Michael.