Commit ea55064c authored by Michael Albinus's avatar Michael Albinus
Browse files

* net/tramp-sh.el (tramp-sh-handle-start-file-process): Fix previous patch.

(tramp-gw-tunnel-method, tramp-gw-socks-method): Declare for
compatibility.
(tramp-compute-multi-hops): Check, whether
`tramp-gw-tunnel-method' and `tramp-gw-socks-method' are non-nil.
parent 1b69262a
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Catch * net/tramp-sh.el (tramp-sh-handle-start-file-process): Catch
`suppress'. Otherwise, `tramp-run-real-handler' might be called `suppress'. Otherwise, `tramp-run-real-handler' might be called
in `tramp-file-name-handler'. in `tramp-file-name-handler'.
(tramp-gw-tunnel-method, tramp-gw-socks-method): Declare for
compatibility.
(tramp-compute-multi-hops): Check, whether
`tramp-gw-tunnel-method' and `tramp-gw-socks-method' are non-nil.
   
2013-01-28 Stefan Monnier <monnier@iro.umontreal.ca> 2013-01-28 Stefan Monnier <monnier@iro.umontreal.ca>
   
......
...@@ -2826,20 +2826,20 @@ the result will be a local, non-Tramp, filename." ...@@ -2826,20 +2826,20 @@ the result will be a local, non-Tramp, filename."
(unwind-protect (unwind-protect
;; We catch this event. Otherwise, `start-process' could ;; We catch this event. Otherwise, `start-process' could
;; be called on the local host. ;; be called on the local host.
(catch 'suppress (save-excursion
(save-excursion (save-restriction
(save-restriction ;; Activate narrowing in order to save BUFFER
;; Activate narrowing in order to save BUFFER ;; contents. Clear also the modification time;
;; contents. Clear also the modification time; ;; otherwise we might be interrupted by
;; otherwise we might be interrupted by ;; `verify-visited-file-modtime'.
;; `verify-visited-file-modtime'. (let ((buffer-undo-list t)
(let ((buffer-undo-list t) (buffer-read-only nil)
(buffer-read-only nil) (mark (point)))
(mark (point))) (clear-visited-file-modtime)
(clear-visited-file-modtime) (narrow-to-region (point-max) (point-max))
(narrow-to-region (point-max) (point-max)) ;; We call `tramp-maybe-open-connection', in order
;; We call `tramp-maybe-open-connection', in order ;; to cleanup the prompt afterwards.
;; to cleanup the prompt afterwards. (catch 'suppress
(tramp-maybe-open-connection v) (tramp-maybe-open-connection v)
(widen) (widen)
(delete-region mark (point)) (delete-region mark (point))
...@@ -2864,7 +2864,7 @@ the result will be a local, non-Tramp, filename." ...@@ -2864,7 +2864,7 @@ the result will be a local, non-Tramp, filename."
;; Save exit. ;; Save exit.
(if (string-match tramp-temp-buffer-name (buffer-name)) (if (string-match tramp-temp-buffer-name (buffer-name))
(progn (ignore-errors
(set-process-buffer (tramp-get-connection-process v) nil) (set-process-buffer (tramp-get-connection-process v) nil)
(kill-buffer (current-buffer))) (kill-buffer (current-buffer)))
(set-buffer-modified-p bmp)) (set-buffer-modified-p bmp))
...@@ -4209,6 +4209,9 @@ Goes through the list `tramp-inline-compress-commands'." ...@@ -4209,6 +4209,9 @@ Goes through the list `tramp-inline-compress-commands'."
(tramp-message (tramp-message
vec 2 "Couldn't find an inline transfer compress command"))))) vec 2 "Couldn't find an inline transfer compress command")))))
(defvar tramp-gw-tunnel-method)
(defvar tramp-gw-socks-method)
(defun tramp-compute-multi-hops (vec) (defun tramp-compute-multi-hops (vec)
"Expands VEC according to `tramp-default-proxies-alist'. "Expands VEC according to `tramp-default-proxies-alist'.
Gateway hops are already opened." Gateway hops are already opened."
...@@ -4269,10 +4272,11 @@ Gateway hops are already opened." ...@@ -4269,10 +4272,11 @@ Gateway hops are already opened."
(setq choices tramp-default-proxies-alist))))) (setq choices tramp-default-proxies-alist)))))
;; Handle gateways. ;; Handle gateways.
(when (string-match (when (and tramp-gw-tunnel-method tramp-gw-socks-method
(format (string-match
"^\\(%s\\|%s\\)$" tramp-gw-tunnel-method tramp-gw-socks-method) (format
(tramp-file-name-method (car target-alist))) "^\\(%s\\|%s\\)$" tramp-gw-tunnel-method tramp-gw-socks-method)
(tramp-file-name-method (car target-alist))))
(let ((gw (pop target-alist)) (let ((gw (pop target-alist))
(hop (pop target-alist))) (hop (pop target-alist)))
;; Is the method prepared for gateways? ;; Is the method prepared for gateways?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment