]> git.eshelyaron.com Git - emacs.git/commit
* lisp/net/tramp: Rework mutual dependencies
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 16 Dec 2018 15:32:53 +0000 (10:32 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 16 Dec 2018 15:32:53 +0000 (10:32 -0500)
commit07d8827946f9364180f18d6842acc80f0997ed75
tree53a43e103081c815c3377475f187ffb5347cfb5e
parente8199e765f81968be840d8e7e3978f5974c1be9d
* lisp/net/tramp: Rework mutual dependencies

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
eval-after-load.
(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
tramp--with-startup.

* lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within
tramp--with-startup.
(tramp-display-escape-sequence-regexp)
(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
tramp--with-startup.
Require tramp-sh at compile-time to precompute some regexps based on
tramp-stat-marker.
lisp/net/tramp-adb.el
lisp/net/tramp-cache.el
lisp/net/tramp-compat.el
lisp/net/tramp-ftp.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-rclone.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp-sudoedit.el
lisp/net/tramp.el