GNU bug report logs - #59194
29.0.50; Tramp autoloads and ordering

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 11 Nov 2022 14:08:02 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Tramp autoloads and ordering
Date: Fri, 11 Nov 2022 09:07:06 -0500
Package: Emacs
Version: 29.0.50


`tramp.el` has the following:

    ;;;###tramp-autoload
    (progn
      (defvar tramp--startup-hook nil
        "Forms to be executed at the end of tramp.el.")
      (put 'tramp--startup-hook 'tramp-suppress-trace t)
    
      (defmacro tramp--with-startup (&rest body)
        "Schedule BODY to be executed at the end of tramp.el."
        `(add-hook 'tramp--startup-hook (lambda () ,@body))))

and then various other Tramp files have autoloaded forms like:

    ;;;###tramp-autoload
    (tramp--with-startup
     (add-to-list 'tramp-methods
      ...))

The problem here is that the resulting `tramp-loaddefs.el` may or may
not be valid depending on the order in which it gets filled, which is
not something that's documented/guaranteed.


        Stefan





This bug report was last modified 2 years and 210 days ago.

Previous Next


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