[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 718c916 24/26: Merge remote-tracking branch 'elpa/externals/
From: |
Thierry Volpiatto |
Subject: |
[elpa] elpa 718c916 24/26: Merge remote-tracking branch 'elpa/externals/async' into elpa |
Date: |
Fri, 30 Apr 2021 14:35:22 -0400 (EDT) |
branch: elpa
commit 718c916d3fa61217774ea69e0cb58512f7642a45
Merge: 943a75c 60118ce
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Merge remote-tracking branch 'elpa/externals/async' into elpa
---
async-bytecomp.el | 12 +++++++-----
async-pkg.el | 10 ----------
async-test.el | 11 ++---------
async.el | 40 +++++++++++++++++++++-------------------
dired-async.el | 51 +++++++++++++++------------------------------------
5 files changed, 45 insertions(+), 79 deletions(-)
diff --git a/async-bytecomp.el b/async-bytecomp.el
index 8fa10e1..037c9d0 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -1,6 +1,6 @@
;;; 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>
@@ -128,13 +128,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
@@ -145,7 +147,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
@@ -155,8 +157,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)
diff --git a/async-pkg.el b/async-pkg.el
deleted file mode 100644
index b277b17..0000000
--- 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 76d6a3a..5387aa0 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
@@ -32,9 +32,6 @@
(require 'async)
-(eval-when-compile
- (require 'cl))
-
(defun async-test-1 ()
(interactive)
(message "Starting async-test-1...")
@@ -134,7 +131,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 6437a30..0e4a743 100644
--- a/async.el
+++ b/async.el
@@ -1,13 +1,14 @@
-;;; 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>
;; 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.3
+;; Package-Requires: ((cl-lib "0.5") (nadvice "0.3"))
+
+;; 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
@@ -39,7 +40,6 @@
(defcustom async-variables-noprops-function #'async--purecopy
"Default function to remove text properties in variables."
- :group 'async
:type 'function)
(defvar async-debug nil)
@@ -100,14 +100,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
@@ -175,16 +175,19 @@ 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))
- ;; Parent expects UTF-8 encoded text.
- (coding-system-for-write '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
(message "Received sexp {{{%s}}}" (pp-to-string sexp)))
(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
@@ -226,8 +229,7 @@ It is intended to be used as follows:
(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)
@@ -333,7 +335,7 @@ will leave *emacs* process buffers hanging around):
(async-start
(lambda ()
(delete-file \"a remote file on a slow link\" nil))
- 'ignore)
+ \\='ignore)
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 5525416..91b705d 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -1,6 +1,6 @@
;;; 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>
@@ -52,46 +52,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)))
@@ -343,31 +335,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’."
- [elpa] elpa 35ab78a 03/26: Merge pull request #114 from tarsius/forge, (continued)
- [elpa] elpa 35ab78a 03/26: Merge pull request #114 from tarsius/forge, Thierry Volpiatto, 2021/04/30
- [elpa] elpa e81c685 08/26: Update *pkg.el file, Thierry Volpiatto, 2021/04/30
- [elpa] elpa d255820 09/26: Merge branch 'master' of github.com:jwiegley/emacs-async, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 03667dd 07/26: Merge pull request #116 from DamienCassou/typos, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 036b475 12/26: Merge pull request #118 from conao3/fix-warnings, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 86aef2c 14/26: Untabify and indent-buffer (#119), Thierry Volpiatto, 2021/04/30
- [elpa] elpa 11769c1 10/26: Update version in source file as well, Thierry Volpiatto, 2021/04/30
- [elpa] elpa a1bd2ac 13/26: untabify and indent-buffer, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 14f48de 16/26: Fix Makefile, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 630708b 21/26: Merge branch 'master' of github.com:jwiegley/emacs-async, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 718c916 24/26: Merge remote-tracking branch 'elpa/externals/async' into elpa,
Thierry Volpiatto <=
- [elpa] elpa 0d01475 25/26: Update version number, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 36a1015 15/26: Change default value of async-bytecomp-allowed-packages to 'all, Thierry Volpiatto, 2021/04/30
- [elpa] elpa d7e7f79 22/26: Update README, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 64bb180 06/26: Fix typos, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 06f0ec7 17/26: Fix typo in previous commit, Thierry Volpiatto, 2021/04/30
- [elpa] elpa fbbba03 11/26: fix package-lint/check-doc/byte-compiler warnings, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 00c6f3f 18/26: fix inclusion of bytecomp variables, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 943a75c 23/26: Fix paren error in dired-async, Thierry Volpiatto, 2021/04/30
- [elpa] elpa c80976d 04/26: Some rewording of part of README.md, Thierry Volpiatto, 2021/04/30
- [elpa] elpa 0fd5d54 19/26: Make the async byte compile variable injection regexp "shy", Thierry Volpiatto, 2021/04/30