[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1cc7bc0 2/2: Improve backward compatibility in tram
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 1cc7bc0 2/2: Improve backward compatibility in tramp-archive |
Date: |
Thu, 4 Jan 2018 06:59:17 -0500 (EST) |
branch: master
commit 1cc7bc0f63ab118fda55aa40fa4b571a7c94393e
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Improve backward compatibility in tramp-archive
* lisp/net/tramp-archive.el
(tramp-archive-handle-temporary-file-directory):
Use `tramp-compat-temporary-file-directory'.
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test37-make-nearby-temp-file):
Wrap `temporary-file-directory' call with `with-no-warnings'.
---
lisp/net/tramp-archive.el | 4 ++--
test/lisp/net/tramp-archive-tests.el | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index 6c96075..45e3bf0 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -531,12 +531,12 @@ offered."
(tramp-archive-gvfs-file-name file) noerror nomessage nosuffix must-suffix))
(defun tramp-archive-handle-temporary-file-directory ()
- "Like `temporary-file-directory' for Tramp files."
+ "Like `temporary-file-directory' for file archives."
;; If the default directory, the file archive, is located on a
;; mounted directory, it is returned as it. Not what we want.
(with-parsed-tramp-archive-file-name default-directory nil
(let ((default-directory (file-name-directory archive)))
- (temporary-file-directory))))
+ (tramp-compat-temporary-file-directory))))
(defun tramp-archive-handle-not-implemented (operation &rest args)
"Generic handler for operations not implemented for file archives."
diff --git a/test/lisp/net/tramp-archive-tests.el
b/test/lisp/net/tramp-archive-tests.el
index 85be2dc..149ed37 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -699,7 +699,8 @@ This tests also `file-executable-p', `file-writable-p' and
`set-file-modes'."
tmp-file)
;; The file archive shall know a temporary file directory. It is
;; not in the archive itself.
- (should (stringp (with-no-warnings (temporary-file-directory))))
+ (should
+ (stringp (with-no-warnings (with-no-warnings
(temporary-file-directory)))))
(should-not
(tramp-archive-file-name-p (with-no-warnings (temporary-file-directory))))