From e792450d4b723ea4ba0037125b52075b57d0ae84 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Dec 2014 17:31:15 +0100 Subject: [PATCH] Sync with Tramp 2.2.11. * net/tramp-compat.el (top): Require cl-macs for Emacs 22. Make an alias for `default-toplevel-value' if it doesn't exist. * net/tramp-smb.el (tramp-smb-handle-copy-directory): Use `tramp-compat-delete-directory'. * net/trampver.el: Update release number. --- lisp/ChangeLog | 12 ++++++++++++ lisp/net/tramp-compat.el | 9 +++++++++ lisp/net/tramp-smb.el | 2 +- lisp/net/trampver.el | 4 ++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d98f81b0d0..74517345064 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2014-12-29 Michael Albinus + + Sync with Tramp 2.2.11. + + * net/tramp-compat.el (top): Require cl-macs for Emacs 22. + Make an alias for `default-toplevel-value' if it doesn't exist. + + * net/tramp-smb.el (tramp-smb-handle-copy-directory): + Use `tramp-compat-delete-directory'. + + * net/trampver.el: Update release number. + 2014-12-29 Filipp Gunbin * autorevert.el (auto-revert-handler): Fix auto-revert-tail-mode diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index de63d8c7c7a..62c1501a3de 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -35,6 +35,11 @@ (eval-and-compile + ;; GNU Emacs 22. + (unless (fboundp 'ignore-errors) + (load "cl" 'noerror) + (load "cl-macs" 'noerror)) + ;; Some packages must be required for XEmacs, because we compile ;; with -no-autoloads. (when (featurep 'xemacs) @@ -586,6 +591,10 @@ and replace a sub-expression, e.g. (setq matches (cons (substring string start l) matches)) ; leftover (apply #'concat (nreverse matches)))))) +;; `default-toplevel-value' has been declared in Emacs 24. +(unless (fboundp 'default-toplevel-value) + (defalias 'default-toplevel-value 'symbol-value)) + (add-hook 'tramp-unload-hook (lambda () (unload-feature 'tramp-loaddefs 'force) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 3d48f47e58e..8f6a10221b6 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -513,7 +513,7 @@ pass to the OPERATION." ;; Reset the transfer process properties. (tramp-set-connection-property v "process-name" nil) (tramp-set-connection-property v "process-buffer" nil) - (when t1 (delete-directory tmpdir 'recurse)))) + (when t1 (tramp-compat-delete-directory tmpdir 'recurse)))) ;; Handle KEEP-DATE argument. (when keep-date diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 065c3f33ebe..f1c36b8603e 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -31,7 +31,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.11-pre" +(defconst tramp-version "2.2.11-24.5" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.11-pre is not fit for %s" + (format "Tramp 2.2.11-24.5 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) -- 2.39.2