aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2020-03-13 10:54:56 +0100
committerMichael Albinus2020-03-13 10:54:56 +0100
commitf7e313956a3799da658b3a988e9645ee8a57bef3 (patch)
tree667ec28250c7d7b242b48ba2bf03c50cf1bc3aa9
parent402b175f358c948b5207924fd2f48c4666ca1c0a (diff)
downloademacs-f7e313956a3799da658b3a988e9645ee8a57bef3.tar.gz
emacs-f7e313956a3799da658b3a988e9645ee8a57bef3.zip
* lisp/net/tramp.el (tramp-accept-process-output): Propagate `quit' signal.
-rw-r--r--lisp/net/tramp.el19
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."
4195(defun tramp-accept-process-output (proc &optional timeout) 4195(defun tramp-accept-process-output (proc &optional timeout)
4196 "Like `accept-process-output' for Tramp processes. 4196 "Like `accept-process-output' for Tramp processes.
4197This is needed in order to hide `last-coding-system-used', which is set 4197This is needed in order to hide `last-coding-system-used', which is set
4198for process communication also." 4198for process communication also.
4199If the user quits via `C-g', it is propagated up to `tramp-file-name-handler'."
4199 (with-current-buffer (process-buffer proc) 4200 (with-current-buffer (process-buffer proc)
4200 (let ((inhibit-read-only t) 4201 (let ((inhibit-read-only t)
4201 last-coding-system-used 4202 last-coding-system-used
4202 result) 4203 result)
4203 ;; JUST-THIS-ONE is set due to Bug#12145. 4204 ;; JUST-THIS-ONE is set due to Bug#12145. `with-local-quit'
4204 (tramp-message 4205 ;; returns t in order to report success.
4205 proc 10 "%s %s %s %s\n%s" 4206 (if (with-local-quit
4206 proc timeout (process-status proc) 4207 (setq result (accept-process-output proc timeout nil t)) t)
4207 (with-local-quit 4208 (tramp-message
4208 (setq result (accept-process-output proc timeout nil t))) 4209 proc 10 "%s %s %s %s\n%s"
4209 (buffer-string)) 4210 proc timeout (process-status proc) result (buffer-string))
4211 ;; Propagate quit.
4212 (keyboard-quit))
4210 result))) 4213 result)))
4211 4214
4212(defun tramp-search-regexp (regexp) 4215(defun tramp-search-regexp (regexp)