aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2022-03-17 15:32:01 +0100
committerMichael Albinus2022-03-17 15:32:01 +0100
commit52dd3fcf89c441be64a94eefa01b704c9aba5090 (patch)
tree904c7e5e97d986caaa7a9b90017840fa0903b6ab
parent693484d36b1326aebd895314570167ca8da87d69 (diff)
downloademacs-52dd3fcf89c441be64a94eefa01b704c9aba5090.tar.gz
emacs-52dd3fcf89c441be64a94eefa01b704c9aba5090.zip
Enable Tramp reloading
* lisp/net/tramp.el (tramp-file-name): Add ;;;###tramp-autoload cookie. (Bug#50869) * test/lisp/net/tramp-tests.el (tramp-test47-unload): Do not skip. Test reload.
-rw-r--r--lisp/net/tramp.el5
-rw-r--r--test/lisp/net/tramp-tests.el9
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 49778cbfeee..38bdfab1929 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1421,7 +1421,10 @@ calling HANDLER.")
1421;; internal data structure. Convenience functions for internal 1421;; internal data structure. Convenience functions for internal
1422;; data structure. 1422;; data structure.
1423 1423
1424;; The basic structure for remote file names. 1424;; The basic structure for remote file names. We must autoload it in
1425;; tramp-loaddefs.el, because some functions, which need it, wouldn't
1426;; work otherwise when unloading / reloading Tramp. (Bug#50869)
1427;;;###tramp-autoload
1425(cl-defstruct (tramp-file-name (:type list) :named) 1428(cl-defstruct (tramp-file-name (:type list) :named)
1426 method user domain host port localname hop) 1429 method user domain host port localname hop)
1427 1430
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index afe7a740638..f34fdbdaf79 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -7265,7 +7265,6 @@ process sentinels. They shall not disturb each other."
7265 "Check that Tramp and its subpackages unload completely. 7265 "Check that Tramp and its subpackages unload completely.
7266Since it unloads Tramp, it shall be the last test to run." 7266Since it unloads Tramp, it shall be the last test to run."
7267 :tags '(:expensive-test) 7267 :tags '(:expensive-test)
7268 (skip-unless noninteractive)
7269 ;; We have autoloaded objects from tramp.el and tramp-archive.el. 7268 ;; We have autoloaded objects from tramp.el and tramp-archive.el.
7270 ;; In order to remove them, we first need to load both packages. 7269 ;; In order to remove them, we first need to load both packages.
7271 (require 'tramp) 7270 (require 'tramp)
@@ -7331,7 +7330,13 @@ Since it unloads Tramp, it shall be the last test to run."
7331 (and (string-match-p "^tramp" (symbol-name fun)) 7330 (and (string-match-p "^tramp" (symbol-name fun))
7332 (ert-fail 7331 (ert-fail
7333 (format "Function `%s' still contains Tramp advice" x)))) 7332 (format "Function `%s' still contains Tramp advice" x))))
7334 x))))) 7333 x))))
7334
7335 ;; Reload.
7336 (require 'tramp)
7337 (require 'tramp-archive)
7338 (should (featurep 'tramp))
7339 (should (featurep 'tramp-archive)))
7335 7340
7336(defun tramp-test-all (&optional interactive) 7341(defun tramp-test-all (&optional interactive)
7337 "Run all tests for \\[tramp]. 7342 "Run all tests for \\[tramp].