emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111619: * net/tramp-sh.el (tramp-sh-


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111619: * net/tramp-sh.el (tramp-sh-handle-start-file-process): Fix previous patch.
Date: Tue, 29 Jan 2013 15:52:20 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111619
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Tue 2013-01-29 15:52:20 +0100
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-01-29 08:12:11 +0000
+++ b/lisp/ChangeLog    2013-01-29 14:52:20 +0000
@@ -5,6 +5,10 @@
        * net/tramp-sh.el (tramp-sh-handle-start-file-process): Catch
        `suppress'.  Otherwise, `tramp-run-real-handler' might be called
        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  <address@hidden>
 

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2013-01-29 08:12:11 +0000
+++ b/lisp/net/tramp-sh.el      2013-01-29 14:52:20 +0000
@@ -2826,20 +2826,20 @@
        (unwind-protect
            ;; We catch this event.  Otherwise, `start-process' could
            ;; be called on the local host.
-           (catch 'suppress
-             (save-excursion
-               (save-restriction
-                 ;; Activate narrowing in order to save BUFFER
-                 ;; contents.  Clear also the modification time;
-                 ;; otherwise we might be interrupted by
-                 ;; `verify-visited-file-modtime'.
-                 (let ((buffer-undo-list t)
-                       (buffer-read-only nil)
-                       (mark (point)))
-                   (clear-visited-file-modtime)
-                   (narrow-to-region (point-max) (point-max))
-                   ;; We call `tramp-maybe-open-connection', in order
-                   ;; to cleanup the prompt afterwards.
+           (save-excursion
+             (save-restriction
+               ;; Activate narrowing in order to save BUFFER
+               ;; contents.  Clear also the modification time;
+               ;; otherwise we might be interrupted by
+               ;; `verify-visited-file-modtime'.
+               (let ((buffer-undo-list t)
+                     (buffer-read-only nil)
+                     (mark (point)))
+                 (clear-visited-file-modtime)
+                 (narrow-to-region (point-max) (point-max))
+                 ;; We call `tramp-maybe-open-connection', in order
+                 ;; to cleanup the prompt afterwards.
+                 (catch 'suppress
                    (tramp-maybe-open-connection v)
                    (widen)
                    (delete-region mark (point))
@@ -2864,7 +2864,7 @@
 
          ;; Save exit.
          (if (string-match tramp-temp-buffer-name (buffer-name))
-             (progn
+             (ignore-errors
                (set-process-buffer (tramp-get-connection-process v) nil)
                (kill-buffer (current-buffer)))
            (set-buffer-modified-p bmp))
@@ -4209,6 +4209,9 @@
        (tramp-message
         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)
   "Expands VEC according to `tramp-default-proxies-alist'.
 Gateway hops are already opened."
@@ -4269,10 +4272,11 @@
            (setq choices tramp-default-proxies-alist)))))
 
     ;; Handle gateways.
-    (when (string-match
-          (format
-           "^\\(%s\\|%s\\)$" tramp-gw-tunnel-method tramp-gw-socks-method)
-          (tramp-file-name-method (car target-alist)))
+    (when (and tramp-gw-tunnel-method tramp-gw-socks-method
+              (string-match
+               (format
+                "^\\(%s\\|%s\\)$" tramp-gw-tunnel-method tramp-gw-socks-method)
+               (tramp-file-name-method (car target-alist))))
       (let ((gw (pop target-alist))
            (hop (pop target-alist)))
        ;; Is the method prepared for gateways?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]