diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2017-05-28 23:44:10 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2017-05-28 23:44:10 +0200 |
commit | e7bb7cc29bc27b368a066c088943c93b1c689b23 (patch) | |
tree | 228e28975ce1c0202be9a0f160d5f827e87f5ce5 /lisp/net/tramp-cache.el | |
parent | 288b3ca2e519903653b9bc88d281ecd9f6b162a4 (diff) | |
download | emacs-e7bb7cc29bc27b368a066c088943c93b1c689b23.tar.gz |
Some tweaks, almost all for Tramp adb method
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
Use `make-tramp-file-name'.
(tramp-adb-get-device): Use `tramp-file-name-port-or-default'.
(tramp-adb-maybe-open-connection): Set "prompt" property.
(tramp-adb-wait-for-output): Use it.
* lisp/net/tramp-cache.el (tramp-cache-print): Use `elt'.
(tramp-dump-connection-properties): Check also that there are
properties to be saved. Don't save "started" property of
"ftp" method.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
Use `make-tramp-file-name'.
* lisp/net/tramp.el (tramp-remote-file-name-spec-regexp):
Host could be empty.
(tramp-file-name-port-or-default): New defun.
(tramp-dissect-file-name): Simplify `make-tramp-file-name' call.
(tramp-handle-file-name-case-insensitive-p): Use a progress reporter.
(tramp-call-process, tramp-call-process-region):
Use `make-tramp-file-name'.
* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
Revert change from 2017-05-24.
(tramp-test05-expand-file-name-relative): Let it also pass for
"adb" method.
Diffstat (limited to 'lisp/net/tramp-cache.el')
-rw-r--r-- | lisp/net/tramp-cache.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index a863860abf1..415cde2fc8a 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -326,8 +326,8 @@ used to cache connection properties of the local machine." ;; (substring-no-properties ;; (cl-struct-slot-value 'tramp-file-name slot key)))))) (dotimes (i (length key)) - (when (stringp (aref key i)) - (aset key i (substring-no-properties (aref key i)))))) + (when (stringp (elt key i)) + (setf (elt key i) (substring-no-properties (elt key i)))))) (when (stringp key) (setq key (substring-no-properties key))) (when (stringp value) @@ -373,12 +373,15 @@ used to cache connection properties of the local machine." ;; Remove temporary data. If there is the key "login-as", we ;; don't save either, because all other properties might ;; depend on the login name, and we want to give the - ;; possibility to use another login name later on. + ;; possibility to use another login name later on. Key + ;; "started" exists for the "ftp" method only, which must be + ;; be kept persistent. (maphash (lambda (key value) - (if (and (tramp-file-name-p key) + (if (and (tramp-file-name-p key) value (not (tramp-file-name-localname key)) - (not (gethash "login-as" value))) + (not (gethash "login-as" value)) + (not (gethash "started" value))) (progn (remhash "process-name" value) (remhash "process-buffer" value) |