summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-03-17 15:32:01 +0100
committerMichael Albinus <michael.albinus@gmx.de>2022-03-17 15:32:01 +0100
commit52dd3fcf89c441be64a94eefa01b704c9aba5090 (patch)
tree904c7e5e97d986caaa7a9b90017840fa0903b6ab
parent693484d36b1326aebd895314570167ca8da87d69 (diff)
downloademacs-52dd3fcf89c441be64a94eefa01b704c9aba5090.tar.gz
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.")
;; internal data structure. Convenience functions for internal
;; data structure.
-;; The basic structure for remote file names.
+;; The basic structure for remote file names. We must autoload it in
+;; tramp-loaddefs.el, because some functions, which need it, wouldn't
+;; work otherwise when unloading / reloading Tramp. (Bug#50869)
+;;;###tramp-autoload
(cl-defstruct (tramp-file-name (:type list) :named)
method user domain host port localname hop)
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."
"Check that Tramp and its subpackages unload completely.
Since it unloads Tramp, it shall be the last test to run."
:tags '(:expensive-test)
- (skip-unless noninteractive)
;; We have autoloaded objects from tramp.el and tramp-archive.el.
;; In order to remove them, we first need to load both packages.
(require 'tramp)
@@ -7331,7 +7330,13 @@ Since it unloads Tramp, it shall be the last test to run."
(and (string-match-p "^tramp" (symbol-name fun))
(ert-fail
(format "Function `%s' still contains Tramp advice" x))))
- x)))))
+ x))))
+
+ ;; Reload.
+ (require 'tramp)
+ (require 'tramp-archive)
+ (should (featurep 'tramp))
+ (should (featurep 'tramp-archive)))
(defun tramp-test-all (&optional interactive)
"Run all tests for \\[tramp].