emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/async 5e95e25f66 3/4: Merge branch 'master' into licens


From: ELPA Syncer
Subject: [elpa] externals/async 5e95e25f66 3/4: Merge branch 'master' into license
Date: Fri, 19 Aug 2022 01:57:24 -0400 (EDT)

branch: externals/async
commit 5e95e25f663947ee6d3b76a40a6367f3510d08c4
Merge: 4e764e4107 6d164db151
Author: John Wiegley <johnw@newartisans.com>
Commit: GitHub <noreply@github.com>

    Merge branch 'master' into license
---
 .dir-locals.el    |   7 ++++
 Makefile          |   2 +-
 README.md         |   7 ++--
 async-bytecomp.el |  44 +++++++++++++---------
 async-pkg.el      |  10 -----
 async-test.el     |  30 ++++++---------
 async.el          | 108 ++++++++++++++++++++++++++++++++++--------------------
 dired-async.el    |  76 ++++++++++++++------------------------
 smtpmail-async.el |  19 +++++-----
 9 files changed, 154 insertions(+), 149 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000000..6d270cf611
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,7 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((nil . ((bug-reference-bug-regexp . "\\(\\b\\(?:[Ii]ssue ?#?\\|[Bb]ug 
?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)")
+         (bug-reference-url-format . 
"https://github.com/jwiegley/emacs-async/issues/%s";)))
+ (emacs-lisp-mode . ((mode . bug-reference-prog)
+                     (indent-tabs-mode . nil))))
diff --git a/Makefile b/Makefile
index 3599a5fa60..5dee2a9cb1 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,7 @@ clean:
 
 # Make autoloads file
 autoloads:
-       $(EVAL) "(progn (setq generated-autoload-file (expand-file-name 
\"helm-autoloads.el\" \"$(PKGDIR)\")) \
+       $(EVAL) "(progn (setq generated-autoload-file (expand-file-name 
\"async-autoloads.el\" \"$(PKGDIR)\")) \
 (setq backup-inhibited t) (update-directory-autoloads \"$(PKGDIR)\"))"
 
 PREFIX=/usr/local/share/
diff --git a/README.md b/README.md
index 393784fb7c..40044d7e39 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
 <p><a href="http://www.gnu.org/licenses/gpl-3.0.txt";><img 
src="https://img.shields.io/badge/license-GPL_3-green.svg"; alt="License GPL 3" 
/></a>
+<a href="https://elpa.gnu.org/packages/async.html";><img 
src="https://elpa.gnu.org/packages/async.svg"; alt="GNU ELPA" title="" /></a>
 <a href="http://melpa.org/#/async";><img 
src="http://melpa.org/packages/async-badge.svg"; alt="MELPA" title="" /></a>
 <a href="http://stable.melpa.org/#/async";><img 
src="http://stable.melpa.org/packages/async-badge.svg"; alt="MELPA Stable" 
title="" /></a></p>
 
@@ -14,10 +15,10 @@ Some async applications are provided as well with this 
package:
 
 # Install
 
-You can install emacs-async package from ELPA or MELPA using package.el.
+You can install emacs-async package from MELPA using package.el.
 
 You can also install from sources, in this case you should install
-using make and make install to ensure emacs-async is intalled in a
+using make and make install to ensure emacs-async is installed in a
 standard load-path destination where other packages can find it
 easily when compiling.
 
@@ -28,7 +29,7 @@ Add to your `.emacs.el`:
     (autoload 'dired-async-mode "dired-async.el" nil t)
     (dired-async-mode 1)
 
-This will allow you to run  asynchronously
+This will allow you to run asynchronously
 the dired commands for copying, renaming and symlinking.
 If you are a [helm](https://github.com/emacs-helm/helm) user, this will allow 
you
 to copy, rename etc... asynchronously from 
[helm](https://github.com/emacs-helm/helm).
diff --git a/async-bytecomp.el b/async-bytecomp.el
index c0b03f20ad..875778108d 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -1,26 +1,25 @@
 ;;; async-bytecomp.el --- Compile elisp files asynchronously -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2019 Free Software Foundation, Inc.
 
 ;; Authors: John Wiegley <jwiegley@gmail.com>
-;;          Thierry Volpiatto <thierry.volpiatto@gmail.com>
+;;          Thierry Volpiatto <thievol@posteo.net>
 
 ;; Keywords: dired async byte-compile
 ;; X-URL: https://github.com/jwiegley/dired-async
 
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, see
-;; <https://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;;
@@ -39,6 +38,10 @@
 
 (require 'cl-lib)
 (require 'async)
+(require 'bytecomp)
+
+(declare-function package-desc-name "package.el")
+(declare-function package-desc-dir "package.el")
 
 (defcustom async-bytecomp-allowed-packages 'all
   "Packages in this list will be compiled asynchronously by `package--compile'.
@@ -54,6 +57,9 @@ all packages are always compiled asynchronously."
 (defvar async-byte-compile-log-file
   (concat user-emacs-directory "async-bytecomp.log"))
 
+(defvar async-bytecomp-load-variable-regexp "\\`load-path\\'"
+  "The variable used by `async-inject-variables' when (re)compiling async.")
+
 ;;;###autoload
 (defun async-byte-recompile-directory (directory &optional quiet)
   "Compile all *.el files in DIRECTORY asynchronously.
@@ -90,7 +96,7 @@ All *.elc files are systematically deleted before proceeding."
     (async-start
      `(lambda ()
         (require 'bytecomp)
-        ,(async-inject-variables "\\`\\(load-path\\)\\|byte\\'")
+        ,(async-inject-variables async-bytecomp-load-variable-regexp)
         (let ((default-directory (file-name-as-directory ,directory))
               error-data)
           (add-to-list 'load-path default-directory)
@@ -127,13 +133,15 @@ All *.elc files are systematically deleted before 
proceeding."
                                  pkgs)))))))
     seen))
 
-(defadvice package--compile (around byte-compile-async)
+(defun async--package-compile (orig-fun pkg-desc &rest args)
   (let ((cur-package (package-desc-name pkg-desc))
         (pkg-dir (package-desc-dir pkg-desc)))
     (if (or (member async-bytecomp-allowed-packages '(t all (all)))
             (memq cur-package (async-bytecomp--get-package-deps
                                async-bytecomp-allowed-packages)))
         (progn
+          ;; FIXME: Why do we use (eq cur-package 'async) once
+          ;; and (string= cur-package "async") afterwards?
           (when (eq cur-package 'async)
             (fmakunbound 'async-byte-recompile-directory))
           ;; Add to `load-path' the latest version of async and
@@ -144,7 +152,7 @@ All *.elc files are systematically deleted before 
proceeding."
           ;; `async-byte-recompile-directory' will add directory
           ;; as needed to `load-path'.
           (async-byte-recompile-directory (package-desc-dir pkg-desc) t))
-      ad-do-it)))
+      (apply orig-fun pkg-desc args))))
 
 ;;;###autoload
 (define-minor-mode async-bytecomp-package-mode
@@ -154,8 +162,8 @@ Async compilation of packages can be controlled by
   :group 'async
   :global t
   (if async-bytecomp-package-mode
-      (ad-activate 'package--compile)
-    (ad-deactivate 'package--compile)))
+      (advice-add 'package--compile :around #'async--package-compile)
+    (advice-remove 'package--compile #'async--package-compile)))
 
 ;;;###autoload
 (defun async-byte-compile-file (file)
@@ -185,7 +193,7 @@ Same as `byte-compile-file' but asynchronous."
     (async-start
      `(lambda ()
         (require 'bytecomp)
-        ,(async-inject-variables "\\`load-path\\'")
+        ,(async-inject-variables async-bytecomp-load-variable-regexp)
         (let ((default-directory ,(file-name-directory file)))
           (add-to-list 'load-path default-directory)
           (byte-compile-file ,file)
diff --git a/async-pkg.el b/async-pkg.el
deleted file mode 100644
index b277b174a4..0000000000
--- a/async-pkg.el
+++ /dev/null
@@ -1,10 +0,0 @@
-;;; async-pkg.el --- Generated package description from async.el
-(define-package "async" "1.9.4"
-  "Asynchronous processing in Emacs"
-  '((emacs "24.3"))
-  :url "https://github.com/jwiegley/emacs-async";
-  :keywords '("async"))
-
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
diff --git a/async-test.el b/async-test.el
index 2d079ed010..362eac77d1 100644
--- a/async-test.el
+++ b/async-test.el
@@ -1,6 +1,6 @@
-;;; async-test.el --- async.el-related tests
+;;; async-test.el --- async.el-related tests  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2019 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <jwiegley@gmail.com>
 ;; Created: 10 Jul 2012
@@ -8,19 +8,18 @@
 ;; Keywords: async
 ;; X-URL: https://github.com/jwiegley/emacs-async
 
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, see
-;; <https://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -31,9 +30,6 @@
 (require 'async)
 
 
-(eval-when-compile
-  (require 'cl))
-
 (defun async-test-1 ()
   (interactive)
   (message "Starting async-test-1...")
@@ -133,7 +129,3 @@
 (provide 'async-test)
 
 ;;; async-test.el ends here
-
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
diff --git a/async.el b/async.el
index e26ff5eee2..0ad14f1d03 100644
--- a/async.el
+++ b/async.el
@@ -1,27 +1,29 @@
-;;; async.el --- Asynchronous processing  -*- lexical-binding: t -*-
+;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2019 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <jwiegley@gmail.com>
+;; Maintainer: Thierry Volpiatto <thievol@posteo.net>
+
 ;; Created: 18 Jun 2012
-;; Version: 1.9.4
-;; Package-Requires: ((emacs "24.3"))
-;; Keywords: convenience async
-;; URL: https://github.com/jwiegley/emacs-async
+;; Version: 1.9.5
+;; Package-Requires: ((emacs "24.4"))
+
+;; Keywords: async
+;; X-URL: https://github.com/jwiegley/emacs-async
 
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, see
-;; <https://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -34,11 +36,10 @@
 
 (defgroup async nil
   "Simple asynchronous processing in Emacs"
-  :group 'emacs)
+  :group 'lisp)
 
 (defcustom async-variables-noprops-function #'async--purecopy
   "Default function to remove text properties in variables."
-  :group 'async
   :type 'function)
 
 (defvar async-debug nil)
@@ -51,6 +52,9 @@
 (defvar async-current-process nil)
 (defvar async--procvar nil)
 
+;; For emacs<29 (only exists in emacs-29+).
+(defvar print-symbols-bare)
+
 (defun async--purecopy (object)
   "Remove text properties in OBJECT.
 
@@ -99,14 +103,14 @@ variable's value with `async-variables-noprops-function'.
 It is intended to be used as follows:
 
     (async-start
-       `(lambda ()
-          (require 'smtpmail)
+       \\=`(lambda ()
+          (require \\='smtpmail)
           (with-temp-buffer
             (insert ,(buffer-substring-no-properties (point-min) (point-max)))
             ;; Pass in the variable environment for smtpmail
-            ,(async-inject-variables \"\\`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
+            ,(async-inject-variables 
\"\\\\=`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
             (smtpmail-send-it)))
-       'ignore)"
+       \\='ignore)"
   `(setq
     ,@(let (bindings)
         (mapatoms
@@ -163,6 +167,19 @@ It is intended to be used as follows:
                         (kill-buffer (current-buffer))))
                   (set (make-local-variable 'async-callback-value) proc)
                   (set (make-local-variable 'async-callback-value-set) t))
+              ;; Maybe strip out unreadable "#"; They are replaced by
+              ;; empty string unless they are prefixing a special
+              ;; object like a marker. See issue #145.
+              (goto-char (point-min))
+              (save-excursion
+                ;; Transform markers in list like
+                ;; (marker (moves after insertion) at 2338 in
+                ;; test\.org) so that remap text properties function
+                ;; can parse it to restitute marker.
+                (while (re-search-forward "#<\\([^>]*\\)>" nil t)
+                  (replace-match (concat "(" (match-string 1) ")") t t)))
+              (while (re-search-forward "#(" nil t)
+                (replace-match "(" t t))
               (goto-char (point-max))
               (backward-sexp)
               (async-handle-result async-callback (read (current-buffer))
@@ -174,8 +191,11 @@ It is intended to be used as follows:
           (set (make-local-variable 'async-callback-value-set) t))))))
 
 (defun async--receive-sexp (&optional stream)
-  (let ((sexp (decode-coding-string (base64-decode-string
-                                     (read stream)) 'utf-8-auto))
+  ;; FIXME: Why use `utf-8-auto' instead of `utf-8-unix'?  This is
+  ;; a communication channel over which we have complete control,
+  ;; so we get to choose exactly which encoding and EOL we use, isn't it?
+  (let ((sexp (decode-coding-string (base64-decode-string (read stream))
+                                    'utf-8-auto))
         ;; Parent expects UTF-8 encoded text.
         (coding-system-for-write 'utf-8-auto))
     (if async-debug
@@ -183,13 +203,15 @@ It is intended to be used as follows:
     (setq sexp (read sexp))
     (if async-debug
         (message "Read sexp {{{%s}}}" (pp-to-string sexp)))
-    (eval sexp)))
+    (eval sexp t)))
 
 (defun async--insert-sexp (sexp)
   (let (print-level
         print-length
         (print-escape-nonascii t)
-        (print-circle t))
+        (print-circle t)
+        ;; Fix bug#153 in emacs-29 with symbol's positions.
+        (print-symbols-bare t))
     (prin1 sexp (current-buffer))
     ;; Just in case the string we're sending might contain EOF
     (encode-coding-region (point-min) (point-max) 'utf-8-auto)
@@ -208,25 +230,22 @@ It is intended to be used as follows:
   "Called from the child Emacs process' command line."
   ;; Make sure 'message' and 'prin1' encode stuff in UTF-8, as parent
   ;; process expects.
-  (let ((coding-system-for-write 'utf-8-auto))
+  (let ((coding-system-for-write 'utf-8-auto)
+        (args-left command-line-args-left))
     (setq async-in-child-emacs t
-          debug-on-error async-debug)
-    (if debug-on-error
+          debug-on-error async-debug
+          command-line-args-left nil)
+    (condition-case-unless-debug err
         (prin1 (funcall
                 (async--receive-sexp (unless async-send-over-pipe
-                                       command-line-args-left))))
-      (condition-case err
-          (prin1 (funcall
-                  (async--receive-sexp (unless async-send-over-pipe
-                                         command-line-args-left))))
-        (error
-         (prin1 (list 'async-signal err)))))))
+                                       args-left))))
+      (error
+       (prin1 (list 'async-signal err))))))
 
 (defun async-ready (future)
   "Query a FUTURE to see if it is ready.
 
-I.e., if no blocking
-would result from a call to `async-get' on that FUTURE."
+I.e., if no blocking would result from a call to `async-get' on that FUTURE."
   (and (memq (process-status future) '(exit signal))
        (let ((buf (process-buffer future)))
          (if (buffer-live-p buf)
@@ -332,7 +351,18 @@ will leave *emacs* process buffers hanging around):
     (async-start
      (lambda ()
        (delete-file \"a remote file on a slow link\" nil))
-     'ignore)
+     \\='ignore)
+
+Special case:
+If the output of START-FUNC is a string with properties
+e.g. (buffer-string) RESULT will be transformed in a list where the
+car is the string itself (without props) and the cdr the rest of
+properties, this allows using in FINISH-FUNC the string without
+properties and then apply the properties in cdr to this string (if
+needed).
+Properties handling special objects like markers are returned as
+list to allow restoring them later.
+See <https://github.com/jwiegley/emacs-async/issues/145> for more infos.
 
 Note: Even when FINISH-FUNC is present, a future is still
 returned except that it yields no value (since the value is
diff --git a/dired-async.el b/dired-async.el
index e9235bea91..3b08f3928c 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -1,26 +1,25 @@
 ;;; dired-async.el --- Asynchronous dired actions -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2019 Free Software Foundation, Inc.
 
 ;; Authors: John Wiegley <jwiegley@gmail.com>
-;;          Thierry Volpiatto <thierry.volpiatto@gmail.com>
+;;          Thierry Volpiatto <thievol@posteo.net>
 
 ;; Keywords: dired async network
 ;; X-URL: https://github.com/jwiegley/dired-async
 
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, see
-;; <https://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -51,46 +50,38 @@
 (defcustom dired-async-env-variables-regexp
   "\\`\\(tramp-\\(default\\|connection\\|remote\\)\\|ange-ftp\\)-.*"
   "Variables matching this regexp will be loaded on Child Emacs."
-  :type  'regexp
-  :group 'dired-async)
+  :type  'regexp)
 
 (defcustom dired-async-message-function 'dired-async-mode-line-message
   "Function to use to notify result when operation finish.
 Should take same args as `message'."
-  :group 'dired-async
   :type  'function)
 
 (defcustom dired-async-log-file "/tmp/dired-async.log"
   "File use to communicate errors from Child Emacs to host Emacs."
-  :group 'dired-async
   :type 'string)
 
 (defcustom dired-async-mode-lighter '(:eval
                                       (when (eq major-mode 'dired-mode)
                                         " Async"))
   "Mode line lighter used for `dired-async-mode'."
-  :group 'dired-async
   :risky t
   :type 'sexp)
 
 (defface dired-async-message
-  '((t (:foreground "yellow")))
-  "Face used for mode-line message."
-  :group 'dired-async)
+    '((t (:foreground "yellow")))
+  "Face used for mode-line message.")
 
 (defface dired-async-failures
-  '((t (:foreground "red")))
-  "Face used for mode-line message."
-  :group 'dired-async)
+    '((t (:foreground "red")))
+  "Face used for mode-line message.")
 
 (defface dired-async-mode-message
-  '((t (:foreground "Gold")))
-  "Face used for `dired-async--modeline-mode' lighter."
-  :group 'dired-async)
+    '((t (:foreground "Gold")))
+  "Face used for `dired-async--modeline-mode' lighter.")
 
 (define-minor-mode dired-async--modeline-mode
-  "Notify mode-line that an async process run."
-  :group 'dired-async
+    "Notify mode-line that an async process run."
   :global t
   :lighter (:eval (propertize (format " [%s Async job(s) running]"
                                       (length (dired-async-processes)))
@@ -320,8 +311,8 @@ ESC or `q' to not overwrite any of the remaining files,
                                  do (condition-case err
                                         (funcall fn from dest t)
                                       (file-error
-                                       (dired-log "%s: %s\n" (car err) (cdr 
err)))
-                                      nil))
+                                       (dired-log "%s: %s\n" (car err) (cdr 
err))
+                                       nil)))
                         (when (get-buffer dired-log-buffer)
                           (dired-log t)
                           (with-current-buffer dired-log-buffer
@@ -342,31 +333,18 @@ ESC or `q' to not overwrite any of the remaining files,
   (let (wdired-use-interactive-rename)
     (apply old-fn args)))
 
-(defadvice wdired-do-renames (around wdired-async)
-  (let (wdired-use-interactive-rename)
-    ad-do-it))
-
-(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
   :lighter dired-async-mode-lighter
   :global t
   (if dired-async-mode
-      (if (fboundp 'advice-add)
-          (progn (advice-add 'dired-create-files :override 
#'dired-async-create-files)
-                 (advice-add 'wdired-do-renames :around 
#'dired-async-wdired-do-renames))
-        (ad-activate 'dired-create-files)
-        (ad-activate 'wdired-do-renames))
-    (if (fboundp 'advice-remove)
-        (progn (advice-remove 'dired-create-files #'dired-async-create-files)
-               (advice-remove 'wdired-do-renames 
#'dired-async-wdired-do-renames))
-      (ad-deactivate 'dired-create-files)
-      (ad-deactivate 'wdired-do-renames))))
+      (progn
+        (advice-add 'dired-create-files :override #'dired-async-create-files)
+        (advice-add 'wdired-do-renames :around 
#'dired-async-wdired-do-renames))
+    (progn
+      (advice-remove 'dired-create-files #'dired-async-create-files)
+      (advice-remove 'wdired-do-renames #'dired-async-wdired-do-renames))))
 
 (defmacro dired-async--with-async-create-files (&rest body)
   "Evaluate BODY with ‘dired-create-files’ set to ‘dired-async-create-files’."
diff --git a/smtpmail-async.el b/smtpmail-async.el
index 322b3e4c4f..5a1c3205e5 100644
--- a/smtpmail-async.el
+++ b/smtpmail-async.el
@@ -8,19 +8,18 @@
 ;; Keywords: email async
 ;; X-URL: https://github.com/jwiegley/emacs-async
 
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, see
-;; <https://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]