diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2020-03-13 10:54:56 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2020-03-13 10:54:56 +0100 |
commit | f7e313956a3799da658b3a988e9645ee8a57bef3 (patch) | |
tree | 667ec28250c7d7b242b48ba2bf03c50cf1bc3aa9 /lisp/net/tramp.el | |
parent | 402b175f358c948b5207924fd2f48c4666ca1c0a (diff) | |
download | emacs-f7e313956a3799da658b3a988e9645ee8a57bef3.tar.gz emacs-f7e313956a3799da658b3a988e9645ee8a57bef3.tar.bz2 emacs-f7e313956a3799da658b3a988e9645ee8a57bef3.zip |
* lisp/net/tramp.el (tramp-accept-process-output): Propagate `quit' signal.
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r-- | lisp/net/tramp.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c498f8c25e7..3ce2225cb84 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4195,18 +4195,21 @@ performed successfully. Any other value means an error." (defun tramp-accept-process-output (proc &optional timeout) "Like `accept-process-output' for Tramp processes. This is needed in order to hide `last-coding-system-used', which is set -for process communication also." +for process communication also. +If the user quits via `C-g', it is propagated up to `tramp-file-name-handler'." (with-current-buffer (process-buffer proc) (let ((inhibit-read-only t) last-coding-system-used result) - ;; JUST-THIS-ONE is set due to Bug#12145. - (tramp-message - proc 10 "%s %s %s %s\n%s" - proc timeout (process-status proc) - (with-local-quit - (setq result (accept-process-output proc timeout nil t))) - (buffer-string)) + ;; JUST-THIS-ONE is set due to Bug#12145. `with-local-quit' + ;; returns t in order to report success. + (if (with-local-quit + (setq result (accept-process-output proc timeout nil t)) t) + (tramp-message + proc 10 "%s %s %s %s\n%s" + proc timeout (process-status proc) result (buffer-string)) + ;; Propagate quit. + (keyboard-quit)) result))) (defun tramp-search-regexp (regexp) |