Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
85942:bed8827b7f62 | 85943:85b6f7d4aca8 |
---|---|
59 ;; Return nil when there is no Tramp connection. | 59 ;; Return nil when there is no Tramp connection. |
60 (list | 60 (list |
61 (let ((connections | 61 (let ((connections |
62 (mapcar | 62 (mapcar |
63 (lambda (x) | 63 (lambda (x) |
64 (with-current-buffer x (list (file-remote-p default-directory)))) | 64 (tramp-make-tramp-file-name |
65 ;; We shall not count debug buffers, because their | 65 (tramp-file-name-method x) |
66 ;; default-directory is random. It could be even a remote | 66 (tramp-file-name-user x) |
67 ;; one from another connection. | 67 (tramp-file-name-host x) |
68 (all-completions | 68 (tramp-file-name-localname x))) |
69 "*tramp" (mapcar 'list (tramp-list-tramp-buffers))))) | 69 (tramp-cache-list-connections))) |
70 name) | 70 name) |
71 | 71 |
72 (when connections | 72 (when connections |
73 (setq name | 73 (setq name |
74 (completing-read | 74 (completing-read |