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

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

[elpa] master 40d4f78 154/187: New mode async-bytecomp-package-mode.


From: Michael Albinus
Subject: [elpa] master 40d4f78 154/187: New mode async-bytecomp-package-mode.
Date: Wed, 30 Dec 2015 11:50:20 +0000

branch: master
commit 40d4f7846df4bac8ad3929c2222eac41b2033933
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    New mode async-bytecomp-package-mode.
    
    * async-bytecomp.el (async-bytecomp-package-mode): Allow enabling 
package--compile
    advice with this mode.
---
 async-bytecomp.el |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/async-bytecomp.el b/async-bytecomp.el
index 047e605..c103420 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -131,7 +131,7 @@ All *.elc files are systematically deleted before 
proceeding."
              (delete-dups
               (append async-bytecomp-allowed-packages reqs)))))
 
-(defadvice package--compile (around byte-compile-async activate)
+(defadvice package--compile (around byte-compile-async)
   (let ((cur-package (package-desc-name pkg-desc)))
     (if (or (equal async-bytecomp-allowed-packages '(all))
             (memq cur-package (async-bytecomp-get-allowed-pkgs)))
@@ -143,6 +143,15 @@ All *.elc files are systematically deleted before 
proceeding."
           (async-byte-recompile-directory (package-desc-dir pkg-desc) t))
         ad-do-it)))
 
+(define-minor-mode async-bytecomp-package-mode
+    "Byte compile asynchronously packages installed with package.el.
+Async compilation of packages can be controlled by
+`async-bytecomp-allowed-packages'."
+  :group 'async
+  :global t
+  (if async-bytecomp-package-mode
+      (ad-activate 'package--compile)
+      (ad-deactivate 'package--compile)))
 
 (provide 'async-bytecomp)
 



reply via email to

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