summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-archive.el24
-rw-r--r--lisp/net/tramp-compat.el8
-rw-r--r--lisp/net/tramp.el6
3 files changed, 25 insertions, 13 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index e6ae73aae61..d7f99667f45 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -475,17 +475,19 @@ name is kept in slot `hop'"
(defun tramp-archive-cleanup-hash ()
"Remove local copies of archives, used by GVFS."
- (maphash
- (lambda (key value)
- ;; Unmount local copy.
- (ignore-errors
- (tramp-message (car value) 3 "Unmounting %s" (or (cdr value) key))
- (tramp-gvfs-unmount (car value)))
- ;; Delete local copy.
- (ignore-errors (delete-file (cdr value)))
- (remhash key tramp-archive-hash))
- tramp-archive-hash)
- (clrhash tramp-archive-hash))
+ ;; Don't check for a proper method.
+ (let ((non-essential t))
+ (maphash
+ (lambda (key value)
+ ;; Unmount local copy.
+ (ignore-errors
+ (tramp-message (car value) 3 "Unmounting %s" (or (cdr value) key))
+ (tramp-gvfs-unmount (car value)))
+ ;; Delete local copy.
+ (ignore-errors (delete-file (cdr value)))
+ (remhash key tramp-archive-hash))
+ tramp-archive-hash)
+ (clrhash tramp-archive-hash)))
(add-hook 'tramp-cleanup-all-connections-hook #'tramp-archive-cleanup-hash)
(add-hook 'kill-emacs-hook #'tramp-archive-cleanup-hash)
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 21a819f79fd..d4380f8deb3 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -290,6 +290,14 @@ A nil value for either argument stands for the current time."
tree))
(nreverse elems)))))
+;; `progress-reporter-update' got argument SUFFIX in Emacs 27.1.
+(defalias 'tramp-compat-progress-reporter-update
+ (if (equal (tramp-compat-funcall 'func-arity #'progress-reporter-update)
+ '(1 . 3))
+ #'progress-reporter-update
+ (lambda (reporter &optional value _suffix)
+ (progress-reporter-update reporter value))))
+
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-loaddefs 'force)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 76eb03b89e0..37b06cbe422 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1928,12 +1928,12 @@ If VAR is nil, then we bind `v' to the structure and `method', `user',
(put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body))
(font-lock-add-keywords 'emacs-lisp-mode '("\\<with-parsed-tramp-file-name\\>"))
-(defun tramp-progress-reporter-update (reporter &optional value)
+(defun tramp-progress-reporter-update (reporter &optional value suffix)
"Report progress of an operation for Tramp."
(let* ((parameters (cdr reporter))
(message (aref parameters 3)))
(when (string-match-p message (or (current-message) ""))
- (progress-reporter-update reporter value))))
+ (tramp-compat-progress-reporter-update reporter value suffix))))
(defmacro with-tramp-progress-reporter (vec level message &rest body)
"Executes BODY, spinning a progress reporter with MESSAGE.
@@ -3865,6 +3865,8 @@ of."
;; The descriptor must be a process object.
(unless (processp proc)
(tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc))
+ ;; There might be pending output.
+ (while (tramp-accept-process-output proc 0))
(tramp-message proc 6 "Kill %S" proc)
(delete-process proc))