• Stefan Monnier's avatar
    * lisp/net/tramp: Rework mutual dependencies · 07d88279
    Stefan Monnier authored
    Functionally split tramp-loaddefs.el into two parts: one part run
    while loading it at the very beginning of loading tramp.el (holding plain
    autoloads and declarations), and another run at the very end of loading
    tramp.el (holding setup code).
    This should reduce infinite-recursion problems while loading.
    * lisp/net/tramp.el: Require tramp-loaddefs at beginning.
    Run (new and internal) tramp--startup-hook at the end.
    Remove all tramp-autoloads.  Prefer tramp--with-startup over
    (tramp--with-startup): New macro.
    (tramp-set-syntax): Show the new value rather than the old value in the
    error message.
    (tramp-syntax-values): Explicitly return 'values'.
    (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp)
    (tramp-postfix-method-format, tramp-postfix-method-regexp)
    (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp)
    (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp)
    (tramp-postfix-host-format, tramp-postfix-host-regexp)
    (tramp-remote-file-name-spec-regexp, tramp-file-name-structure)
    (tramp-completion-file-name-regexp): Don't initialize in the declaration,
    since it's recomputed at the end anyway.
    (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use.
    * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more.
    (tramp-compat-tramp-syntax): Declare tramp-syntax.
    * lisp/net/tramp-smb.el:
    * lisp/net/tramp-rclone.el:
    * lisp/net/tramp-gvfs.el:
    * lisp/net/tramp-ftp.el:
    * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within
    * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within
    (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more.
    (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload.
    * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within
    Require tramp-sh at compile-time to precompute some regexps based on
tramp-compat.el 11.5 KB