diff lisp/net/tramp-cmds.el @ 85943:85b6f7d4aca8

* net/tramp.el (top): Don't autoload `tramp-cache-print'. * net/tramp-cache (tramp-cache-print): Move down. (tramp-cache-list-connections): New defun. * net/tramp-cmds.el (tramp-cleanup-connection): Use it.
author Michael Albinus <michael.albinus@gmx.de>
date Tue, 06 Nov 2007 21:17:36 +0000
parents 21983e7c844a
children 7f134b676a0c
line wrap: on
line diff
--- a/lisp/net/tramp-cmds.el	Tue Nov 06 12:32:16 2007 +0000
+++ b/lisp/net/tramp-cmds.el	Tue Nov 06 21:17:36 2007 +0000
@@ -61,12 +61,12 @@
     (let ((connections
 	   (mapcar
 	    (lambda (x)
-	      (with-current-buffer x (list (file-remote-p default-directory))))
-	    ;; We shall not count debug buffers, because their
-	    ;; default-directory is random.  It could be even a remote
-	    ;; one from another connection.
-	    (all-completions
-	     "*tramp" (mapcar 'list (tramp-list-tramp-buffers)))))
+	      (tramp-make-tramp-file-name
+	       (tramp-file-name-method x)
+	       (tramp-file-name-user x)
+	       (tramp-file-name-host x)
+	       (tramp-file-name-localname x)))
+	    (tramp-cache-list-connections)))
 	  name)
 
       (when connections