summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-compat.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-05-08 17:27:50 +0200
committerMichael Albinus <michael.albinus@gmx.de>2017-05-08 17:27:50 +0200
commit73e3ed48e21287d48fda8d04e55f8b79b526ca50 (patch)
tree0469f5c6bc24befa0e6651ad970a12cb31c46e8e /lisp/net/tramp-compat.el
parent52f7440b8ea8e18f7e83f8d107bd5e4df1bda7b1 (diff)
downloademacs-73e3ed48e21287d48fda8d04e55f8b79b526ca50.tar.gz
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.
Diffstat (limited to 'lisp/net/tramp-compat.el')
-rw-r--r--lisp/net/tramp-compat.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 732922b60ec..322e9c36895 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -197,10 +197,7 @@ Add the extension of F, if existing."
(tramp-compat-funcall 'delete-file filename trash)
;; This Emacs version does not support the TRASH flag.
(wrong-number-of-arguments
- (let ((delete-by-moving-to-trash
- (and (boundp 'delete-by-moving-to-trash)
- (symbol-value 'delete-by-moving-to-trash)
- trash)))
+ (let ((delete-by-moving-to-trash (and delete-by-moving-to-trash trash)))
(delete-file filename)))))
;; RECURSIVE has been introduced with Emacs 23.2. TRASH has been