diff options
| author | Eli Zaretskii | 2019-06-15 13:16:36 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-06-15 13:16:36 +0300 |
| commit | 33c585edd4e228ea24f0d3924571c7d950079073 (patch) | |
| tree | 1ed3716ef7f34c7d539318c088be81090265baa6 /lisp | |
| parent | 2a364d84c18527c344dec6f5bd577861df3f1679 (diff) | |
| parent | e1867056ae7ef3ffce90d4b2564a9e81b54818ba (diff) | |
| download | emacs-33c585edd4e228ea24f0d3924571c7d950079073.tar.gz emacs-33c585edd4e228ea24f0d3924571c7d950079073.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp-archive.el | 24 | ||||
| -rw-r--r-- | lisp/net/tramp-compat.el | 8 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 6 |
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'" | |||
| 475 | 475 | ||
| 476 | (defun tramp-archive-cleanup-hash () | 476 | (defun tramp-archive-cleanup-hash () |
| 477 | "Remove local copies of archives, used by GVFS." | 477 | "Remove local copies of archives, used by GVFS." |
| 478 | (maphash | 478 | ;; Don't check for a proper method. |
| 479 | (lambda (key value) | 479 | (let ((non-essential t)) |
| 480 | ;; Unmount local copy. | 480 | (maphash |
| 481 | (ignore-errors | 481 | (lambda (key value) |
| 482 | (tramp-message (car value) 3 "Unmounting %s" (or (cdr value) key)) | 482 | ;; Unmount local copy. |
| 483 | (tramp-gvfs-unmount (car value))) | 483 | (ignore-errors |
| 484 | ;; Delete local copy. | 484 | (tramp-message (car value) 3 "Unmounting %s" (or (cdr value) key)) |
| 485 | (ignore-errors (delete-file (cdr value))) | 485 | (tramp-gvfs-unmount (car value))) |
| 486 | (remhash key tramp-archive-hash)) | 486 | ;; Delete local copy. |
| 487 | tramp-archive-hash) | 487 | (ignore-errors (delete-file (cdr value))) |
| 488 | (clrhash tramp-archive-hash)) | 488 | (remhash key tramp-archive-hash)) |
| 489 | tramp-archive-hash) | ||
| 490 | (clrhash tramp-archive-hash))) | ||
| 489 | 491 | ||
| 490 | (add-hook 'tramp-cleanup-all-connections-hook #'tramp-archive-cleanup-hash) | 492 | (add-hook 'tramp-cleanup-all-connections-hook #'tramp-archive-cleanup-hash) |
| 491 | (add-hook 'kill-emacs-hook #'tramp-archive-cleanup-hash) | 493 | (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." | |||
| 290 | tree)) | 290 | tree)) |
| 291 | (nreverse elems))))) | 291 | (nreverse elems))))) |
| 292 | 292 | ||
| 293 | ;; `progress-reporter-update' got argument SUFFIX in Emacs 27.1. | ||
| 294 | (defalias 'tramp-compat-progress-reporter-update | ||
| 295 | (if (equal (tramp-compat-funcall 'func-arity #'progress-reporter-update) | ||
| 296 | '(1 . 3)) | ||
| 297 | #'progress-reporter-update | ||
| 298 | (lambda (reporter &optional value _suffix) | ||
| 299 | (progress-reporter-update reporter value)))) | ||
| 300 | |||
| 293 | (add-hook 'tramp-unload-hook | 301 | (add-hook 'tramp-unload-hook |
| 294 | (lambda () | 302 | (lambda () |
| 295 | (unload-feature 'tramp-loaddefs 'force) | 303 | (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', | |||
| 1928 | (put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body)) | 1928 | (put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body)) |
| 1929 | (font-lock-add-keywords 'emacs-lisp-mode '("\\<with-parsed-tramp-file-name\\>")) | 1929 | (font-lock-add-keywords 'emacs-lisp-mode '("\\<with-parsed-tramp-file-name\\>")) |
| 1930 | 1930 | ||
| 1931 | (defun tramp-progress-reporter-update (reporter &optional value) | 1931 | (defun tramp-progress-reporter-update (reporter &optional value suffix) |
| 1932 | "Report progress of an operation for Tramp." | 1932 | "Report progress of an operation for Tramp." |
| 1933 | (let* ((parameters (cdr reporter)) | 1933 | (let* ((parameters (cdr reporter)) |
| 1934 | (message (aref parameters 3))) | 1934 | (message (aref parameters 3))) |
| 1935 | (when (string-match-p message (or (current-message) "")) | 1935 | (when (string-match-p message (or (current-message) "")) |
| 1936 | (progress-reporter-update reporter value)))) | 1936 | (tramp-compat-progress-reporter-update reporter value suffix)))) |
| 1937 | 1937 | ||
| 1938 | (defmacro with-tramp-progress-reporter (vec level message &rest body) | 1938 | (defmacro with-tramp-progress-reporter (vec level message &rest body) |
| 1939 | "Executes BODY, spinning a progress reporter with MESSAGE. | 1939 | "Executes BODY, spinning a progress reporter with MESSAGE. |
| @@ -3865,6 +3865,8 @@ of." | |||
| 3865 | ;; The descriptor must be a process object. | 3865 | ;; The descriptor must be a process object. |
| 3866 | (unless (processp proc) | 3866 | (unless (processp proc) |
| 3867 | (tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc)) | 3867 | (tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc)) |
| 3868 | ;; There might be pending output. | ||
| 3869 | (while (tramp-accept-process-output proc 0)) | ||
| 3868 | (tramp-message proc 6 "Kill %S" proc) | 3870 | (tramp-message proc 6 "Kill %S" proc) |
| 3869 | (delete-process proc)) | 3871 | (delete-process proc)) |
| 3870 | 3872 | ||