emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Thu, 27 Sep 2007 04:37:34 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       07/09/27 04:37:33

Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -b -r1.138 -r1.139
--- net/tramp.el        24 Sep 2007 05:29:29 -0000      1.138
+++ net/tramp.el        27 Sep 2007 04:37:33 -0000      1.139
@@ -2422,7 +2422,7 @@
        res-size
        ;; 8. File modes, as a string of ten letters or dashes as in ls -l.
        res-filemodes
-       ;; 9. t iff file's gid would change if file were deleted and
+       ;; 9. t if file's gid would change if file were deleted and
        ;; recreated.  Will be set in `tramp-convert-file-attributes'
        t
        ;; 10. inode number.
@@ -5688,9 +5688,7 @@
   (tramp-send-command-internal vec "set +o vi +o emacs")
   (tramp-message vec 5 "Setting shell prompt")
   ;; Douglas Gray Stephens <address@hidden> says that we must
-  ;; use "\n" here, not tramp-rsh-end-of-line.  We also manually frob
-  ;; the last time we sent a command, to avoid `tramp-send-command' to
-  ;; send "echo are you awake".
+  ;; use "\n" here, not tramp-rsh-end-of-line.
   (tramp-send-command
    vec
    (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''"
@@ -6044,14 +6042,21 @@
     ;; tries to send some data to the remote end.  So that's why we
     ;; try to send a command from time to time, then look again
     ;; whether the process is really alive.
+    (condition-case nil
     (when (and (> (tramp-time-diff
                   (current-time)
-                  (tramp-get-connection-property p "last-cmd-time" '(0 0 0)))
+                      (tramp-get-connection-property
+                       p "last-cmd-time" '(0 0 0)))
                  60)
               p (processp p) (memq (process-status p) '(run open)))
       (tramp-send-command vec "echo are you awake" t t)
       (unless (and (memq (process-status p) '(run open))
                   (tramp-wait-for-output p 10))
+           ;; The error will be catched locally.
+           (tramp-error vec 'file-error "Awake did fail")))
+      (file-error
+       (tramp-flush-connection-property vec nil)
+       (tramp-flush-connection-property p nil)
        (delete-process p)
        (setq p nil)))
 
@@ -6571,7 +6576,7 @@
         (string-to-number (match-string 2 host)))))
 
 (defun tramp-tramp-file-p (name)
-  "Return t iff NAME is a tramp file."
+  "Return t if NAME is a tramp file."
   (save-match-data
     (string-match tramp-file-name-regexp name)))
 




reply via email to

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