]> code.delx.au - gnu-emacs-elpa/commitdiff
* async.el: Fix recompilation of async dir.
authorThierry Volpiatto <thierry.volpiatto@gmail.com>
Fri, 12 Sep 2014 08:18:08 +0000 (12:18 +0400)
committerThierry Volpiatto <thierry.volpiatto@gmail.com>
Fri, 12 Sep 2014 08:18:08 +0000 (12:18 +0400)
* async-bytecomp.el: load async on startup.

async-bytecomp.el
async.el

index 6658bc4f2faff9101ab7fcf175f04fd52e5373b3..d4da424e45c5d22048e8c1e46b597a895db7d205 100644 (file)
@@ -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 ()
 
 (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)
 
index 45cdb4c236354d698985c49a91cd8578b32e24ad..bb97674c8379f8e62d208872fde4eb05c2c32630 100644 (file)
--- 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>"