"J.D. Smith" writes: > Michael Albinus writes: > >> "J.D. Smith" writes: >> >> Hi, >> >>> 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)) >> >> That works with Emacs 28, if I put these lines before the >> tramp--with-startup macro declaration. >> >> I cannot test with the master branch, because the autoload-macro patch >> doesn't seem to be there yet. > > Great. I will push it soon and then you can test, or feel free to try > this patch in the meantime. Here's an updated patch to try with TRAMP, to see if it works as expected in both old and new Emacs versions. Note that there are many places where TRAMP does something more advanced, like: ;;;###tramp-autoload (when (featurep 'dbusbind) (tramp--with-startup (dolist (method tramp-gvfs-methods) ... so I think you'll need to keep autoloading the macro definition too.