GNU bug report logs - #78995
[PATCH] ;;;autoload-expand for special macros

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Fri, 11 Jul 2025 19:29:02 UTC

Severity: normal

Tags: patch

Fixed in version 31

Done: "J.D. Smith" <jdtsmith <at> gmail.com>

Full log


Message #125 received at 78995 <at> debbugs.gnu.org (full text, mbox):

From: "J.D. Smith" <jdtsmith <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 78995 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#78995: [PATCH] ;;;autoload-expand for special macros
Date: Fri, 01 Aug 2025 14:48:06 -0400
Michael Albinus <michael.albinus <at> gmx.de> writes:

> "J.D. Smith" <jdtsmith <at> gmail.com> 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.
>
> That doesn't work with Emacs 28:
>

Hmm, I guess `loaddefs-gen' was introduced in emacs 29.  But I think you
don't actually need that `require' at all.  Maybe try a simple:

    (unless (alist-get 'autoload-macro macro-declarations-alist)
      (push '(autoload-macro ignore) macro-declarations-alist))




This bug report was last modified 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.