aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2016-09-17 10:01:31 +0200
committerMichael Albinus2016-09-17 10:01:31 +0200
commitaab079d1d2d391bd1d6892a6bed0bc98eebce02d (patch)
tree258081e904cd251c95efc0816dcc4f23596417e2
parentb458ac205ebfdb532ee26ed4ea04000869bb37d0 (diff)
downloademacs-aab079d1d2d391bd1d6892a6bed0bc98eebce02d.tar.gz
emacs-aab079d1d2d391bd1d6892a6bed0bc98eebce02d.zip
Minor Tramp tweaks
* lisp/net/tramp.el (tramp-get-buffer): Reuse connection property "process-buffer" if already existing. (tramp-connectable-p): Suppress debug messages.
-rw-r--r--lisp/net/tramp.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 0dade732c46..2a8a5ef15fa 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1314,7 +1314,11 @@ necessary only. This function will be used in file name completion."
1314 "Get the connection buffer to be used for VEC." 1314 "Get the connection buffer to be used for VEC."
1315 (or (get-buffer (tramp-buffer-name vec)) 1315 (or (get-buffer (tramp-buffer-name vec))
1316 (with-current-buffer (get-buffer-create (tramp-buffer-name vec)) 1316 (with-current-buffer (get-buffer-create (tramp-buffer-name vec))
1317 (tramp-set-connection-property vec "process-buffer" nil) 1317 ;; We use existence of connection property "process-buffer" as
1318 ;; indication, whether a connection is active.
1319 (tramp-set-connection-property
1320 vec "process-buffer"
1321 (tramp-get-connection-property vec "process-buffer" nil))
1318 (setq buffer-undo-list t) 1322 (setq buffer-undo-list t)
1319 (setq default-directory 1323 (setq default-directory
1320 (tramp-make-tramp-file-name 1324 (tramp-make-tramp-file-name
@@ -2284,11 +2288,12 @@ should never be set globally, the intention is to let-bind it.")
2284 "Check, whether it is possible to connect the remote host w/o side-effects. 2288 "Check, whether it is possible to connect the remote host w/o side-effects.
2285This is true, if either the remote host is already connected, or if we are 2289This is true, if either the remote host is already connected, or if we are
2286not in completion mode." 2290not in completion mode."
2287 (and (tramp-tramp-file-p filename) 2291 (let (tramp-verbose)
2288 (or (not (tramp-completion-mode-p)) 2292 (and (tramp-tramp-file-p filename)
2289 (tramp-compat-process-live-p 2293 (or (not (tramp-completion-mode-p))
2290 (tramp-get-connection-process 2294 (tramp-compat-process-live-p
2291 (tramp-dissect-file-name filename)))))) 2295 (tramp-get-connection-process
2296 (tramp-dissect-file-name filename)))))))
2292 2297
2293(defun tramp-completion-handle-expand-file-name (name &optional dir) 2298(defun tramp-completion-handle-expand-file-name (name &optional dir)
2294 "Like `expand-file-name' for Tramp files." 2299 "Like `expand-file-name' for Tramp files."