diff options
| author | Michael Albinus | 2019-12-20 13:32:24 +0100 |
|---|---|---|
| committer | Michael Albinus | 2019-12-20 13:32:24 +0100 |
| commit | 85a60da92d4db5c87ecfa152501d246425550fc3 (patch) | |
| tree | 091c1cff79736dc8c50c941e3a3da273666bebcd | |
| parent | dad47bff3d5740d8cacf1495e6becfb16a393bb0 (diff) | |
| download | emacs-85a60da92d4db5c87ecfa152501d246425550fc3.tar.gz emacs-85a60da92d4db5c87ecfa152501d246425550fc3.zip | |
Fix error in tramp-process-sentinel
* lisp/net/tramp.el (tramp-process-sentinel): Check, that process
buffer is alive.
| -rw-r--r-- | lisp/net/tramp.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4b44d7a8031..36bfe5ef865 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 | |||
| 4301 | "Flush file caches and remove shell prompt." | 4301 | "Flush file caches and remove shell prompt." |
| 4302 | (unless (process-live-p proc) | 4302 | (unless (process-live-p proc) |
| 4303 | (let ((vec (process-get proc 'vector)) | 4303 | (let ((vec (process-get proc 'vector)) |
| 4304 | (buf (process-buffer proc)) | ||
| 4304 | (prompt (tramp-get-connection-property proc "prompt" nil))) | 4305 | (prompt (tramp-get-connection-property proc "prompt" nil))) |
| 4305 | (when vec | 4306 | (when vec |
| 4306 | (tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event) | 4307 | (tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event) |
| 4307 | (tramp-flush-connection-properties proc) | 4308 | (tramp-flush-connection-properties proc) |
| 4308 | (tramp-flush-directory-properties vec "")) | 4309 | (tramp-flush-directory-properties vec "")) |
| 4309 | (with-current-buffer (process-buffer proc) | 4310 | (when (buffer-live-p buf) |
| 4310 | (when (and prompt (tramp-search-regexp (regexp-quote prompt))) | 4311 | (with-current-buffer buf |
| 4311 | (delete-region (point) (point-max))))))) | 4312 | (when (and prompt (tramp-search-regexp (regexp-quote prompt))) |
| 4313 | (delete-region (point) (point-max)))))))) | ||
| 4312 | 4314 | ||
| 4313 | (defun tramp-get-inode (vec) | 4315 | (defun tramp-get-inode (vec) |
| 4314 | "Return the virtual inode number. | 4316 | "Return the virtual inode number. |