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 #86 received at 78995 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "J.D. Smith" <jdtsmith <at> gmail.com>
Cc: 78995 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#78995: [PATCH] ;;;autoload-expand for special macros
Date: Tue, 29 Jul 2025 17:18:33 -0400
>> Damn!  So now I'm the one who needs to figure out how to keep it working
>> in Emacs<31 while trying to make it behave with the new
>> "autoload-expand".
> Maybe it is as simple as requiring a (new?) file that defines the macro
> directly, and whenever you require tramp-loaddefs, using NOERROR=t?

I *think* it's simpler than that: just add the `declare` thingy and the
NOERROR=t.


        Stefan


diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 9787e3a6553..f003bbebf31 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -29,7 +29,7 @@
 
 ;;; Code:
 
-(require 'tramp-loaddefs)
+(require 'tramp-loaddefs nil t) ;; Don't error while building the autoloads.
 (require 'ansi-color)
 (require 'auth-source)
 (require 'format-spec)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2208ce880d7..485c18fc4a2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -105,6 +105,7 @@ tramp-completion-file-name-regexp
 
   (defmacro tramp--with-startup (&rest body)
     "Schedule BODY to be executed at the end of tramp.el."
+    (declare (autoload macro-expand))
     `(add-hook 'tramp--startup-hook (lambda () ,@body)))
 
   (eval-and-compile





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.