From 73e3ed48e21287d48fda8d04e55f8b79b526ca50 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 8 May 2017 17:27:50 +0200 Subject: Handle `write-region' messages in Tramp properly * lisp/net/tramp.el (tramp-handle-write-region-message): New defsubst. * lisp/net/tramp-adb.el (tramp-adb-handle-write-region): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region): * lisp/net/tramp-sh.el (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use it. * lisp/net/tramp.el (tramp-password-prompt-regexp) (tramp-completion-mode-p): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `bound-and-true-p'. * lisp/net/tramp-compat.el (tramp-compat-delete-file): Don't check for `boundp' anymore. * test/lisp/net/tramp-tests.el (ert-x): Require it. (tramp--test-messages): New defvar. (tramp-test10-write-region): Extend test. --- lisp/net/tramp-sh.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lisp/net/tramp-sh.el') diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 971cdaedf82..adadf9650e6 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3412,11 +3412,7 @@ the result will be a local, non-Tramp, file name." ;; Set the ownership. (when need-chown (tramp-set-file-uid-gid filename uid gid)) - (when (or (eq visit t) (null visit) (stringp visit)) - (tramp-message v 0 "Wrote `%s' (%d characters)" filename - (cond ((null start) (buffer-size)) - ((stringp start) (length start)) - (t (- end start))))) + (tramp-handle-write-region-message v start end filename append visit) (run-hooks 'tramp-handle-write-region-hook))))) (defvar tramp-vc-registered-file-names nil -- cgit v1.2.3