branch: master
commit 057d002e952d83d1bbb9db78da4b14f5417e18a9
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
* async.el: Fix recompilation of async dir.
* async-bytecomp.el: load async on startup.
---
async-bytecomp.el | 11 ++++++++---
async.el | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/async-bytecomp.el b/async-bytecomp.el
index 6658bc4..d4da424 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -49,6 +49,7 @@
unless dir return nil
for f in dir
when (file-exists-p f) do (delete-file f))
+ (load (locate-library "async"))
(let ((call-back
`(lambda (&optional ignore)
(if (file-exists-p async-byte-compile-log-file)
@@ -64,8 +65,9 @@
(goto-char (point-min))
(while (re-search-forward "^.*:Error:" nil t)
(incf n)))
- (when (> n 0)
- (message "Failed to compile %d files in directory `%s'"
n ,directory))))
+ (if (> n 0)
+ (message "Failed to compile %d files in directory
`%s'" n ,directory)
+ (message "Directory `%s' compiled asynchronously with
warnings" ,directory))))
(message "Directory `%s' compiled asynchronously with success"
,directory)))))
(async-start
`(lambda ()
@@ -87,7 +89,10 @@
(defadvice package--compile (around byte-compile-async activate)
(package-activate-1 pkg-desc)
- (async-byte-recompile-directory (package-desc-dir pkg-desc) 0 t))
+ (let ((compfn (if (fboundp 'async-byte-recompile-directory)
+ #'async-byte-recompile-directory
+ #'byte-recompile-directory)))
+ (funcall compfn (package-desc-dir pkg-desc) 0 t)))
(provide 'async-bytecomp)
diff --git a/async.el b/async.el
index 45cdb4c..bb97674 100644
--- a/async.el
+++ b/async.el
@@ -268,7 +268,7 @@ returns nil. It can still be useful, however, as an
argument to
(expand-file-name invocation-name
invocation-directory))
,finish-func
- "-Q" "-l" ,(symbol-file 'async-batch-invoke 'defun)
+ "-Q" "-l" ,(locate-library "async")
"-batch" "-f" "async-batch-invoke"
(if async-send-over-pipe
"<none>"