;;; tramp-cmds.el --- Interactive commands for Tramp
-;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
nil
(mapcar
(lambda (x)
- (with-current-buffer x
- (when (and (stringp default-directory)
- (file-remote-p default-directory))
- x)))
+ (with-current-buffer x (when (tramp-tramp-file-p default-directory) x)))
(buffer-list))))
;;;###tramp-autoload
(completing-read
"Enter Tramp connection: " connections nil t
(try-completion "" connections)))
- (when (and name (file-remote-p name))
- (with-parsed-tramp-file-name name nil v))))
+ (and (tramp-tramp-file-p name) (tramp-dissect-file-name name))))
nil nil))
(if (not vec)
;; Flush password cache.
(unless keep-password (tramp-clear-passwd vec))
+ ;; Cleanup `tramp-current-connection'. Otherwise, we would be
+ ;; suppressed in the test suite. We use `keep-password' as
+ ;; indicator; it is not worth to add a new argument.
+ (when keep-password (setq tramp-current-connection nil))
+
;; Flush file cache.
(tramp-flush-directory-property vec "")
(defun tramp-cleanup-this-connection ()
"Flush all connection related objects of the current buffer's connection."
(interactive)
- (and (stringp default-directory)
- (file-remote-p default-directory)
+ (and (tramp-tramp-file-p default-directory)
(tramp-cleanup-connection
(tramp-dissect-file-name default-directory 'noexpand))))