emacs-diffs
[Top][All Lists]
Advanced

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

master 85a60da: Fix error in tramp-process-sentinel


From: Michael Albinus
Subject: master 85a60da: Fix error in tramp-process-sentinel
Date: Fri, 20 Dec 2019 07:32:34 -0500 (EST)

branch: master
commit 85a60da92d4db5c87ecfa152501d246425550fc3
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix error in tramp-process-sentinel
    
    * lisp/net/tramp.el (tramp-process-sentinel): Check, that process
    buffer is alive.
---
 lisp/net/tramp.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 4b44d7a..36bfe5e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4301,14 +4301,16 @@ the remote host use line-endings as defined in the 
variable
   "Flush file caches and remove shell prompt."
   (unless (process-live-p proc)
     (let ((vec (process-get proc 'vector))
+         (buf (process-buffer proc))
          (prompt (tramp-get-connection-property proc "prompt" nil)))
       (when vec
        (tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event)
         (tramp-flush-connection-properties proc)
         (tramp-flush-directory-properties vec ""))
-      (with-current-buffer (process-buffer proc)
-        (when (and prompt (tramp-search-regexp (regexp-quote prompt)))
-         (delete-region (point) (point-max)))))))
+      (when (buffer-live-p buf)
+       (with-current-buffer buf
+          (when (and prompt (tramp-search-regexp (regexp-quote prompt)))
+           (delete-region (point) (point-max))))))))
 
 (defun tramp-get-inode (vec)
   "Return the virtual inode number.



reply via email to

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