From bedfa967e0bd0f156e2f73c13940121f674db1a8 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Mon, 11 May 2015 22:14:20 +0200 Subject: [PATCH] * dired-async.el: Fix compatibility with emacs-24.3. --- dired-async.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dired-async.el b/dired-async.el index 441e7fa63..ac45be74e 100644 --- a/dired-async.el +++ b/dired-async.el @@ -265,14 +265,22 @@ ESC or `q' to not overwrite any of the remaining files, (setq dired-async-operation (list operation (length async-fn-list))) (message "%s proceeding asynchronously..." operation)))) +(defadvice dired-create-files (around dired-async) + (dired-async-create-files file-creator operation fn-list + name-constructor marker-char)) + ;;;###autoload (define-minor-mode dired-async-mode "Do dired actions asynchronously." :group 'dired-async :global t (if dired-async-mode - (advice-add 'dired-create-files :override #'dired-async-create-files) - (advice-remove 'dired-create-files #'dired-async-create-files))) + (if (fboundp 'advice-add) + (advice-add 'dired-create-files :override #'dired-async-create-files) + (ad-activate 'dired-create-files)) + (if (fboundp 'advice-remove) + (advice-remove 'dired-create-files #'dired-async-create-files) + (ad-deactivate 'dired-create-files)))) (provide 'dired-async) -- 2.39.2