[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d250e7b 139/187: Allow customizing which packages compile
From: |
Michael Albinus |
Subject: |
[elpa] master d250e7b 139/187: Allow customizing which packages compile async (#46). |
Date: |
Wed, 30 Dec 2015 11:50:13 +0000 |
branch: master
commit d250e7bd2ccad3f5a5c37de9774cc91cf57afdc9
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
Allow customizing which packages compile async (#46).
* async-bytecomp.el (async-bytecomp-allowed-packages): New user var.
(package--compile): Use it.
---
async-bytecomp.el | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/async-bytecomp.el b/async-bytecomp.el
index 7e682f6..1638fb9 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -42,6 +42,11 @@
(require 'cl-lib)
(require 'async)
+(defcustom async-bytecomp-allowed-packages '(async helm)
+ "Packages in this list will be compiled asynchronously by
`package--compile'."
+ :group 'async
+ :type '(repeat (choice symbol)))
+
(defvar async-byte-compile-log-file "~/.emacs.d/async-bytecomp.log")
(defun async-byte-recompile-directory (directory &optional quiet)
@@ -95,11 +100,16 @@ All *.elc files are systematically deleted before
proceeding."
(message "Started compiling asynchronously directory %s" directory)))
(defadvice package--compile (around byte-compile-async activate)
- (when (eq (package-desc-name pkg-desc) 'async)
- (fmakunbound 'async-byte-recompile-directory))
- (package-activate-1 pkg-desc)
- (load "async-bytecomp") ; emacs-24.3 don't reload new files.
- (async-byte-recompile-directory (package-desc-dir pkg-desc) t))
+ (let ((cur-package (package-desc-name pkg-desc)))
+ (if (memq cur-package async-bytecomp-allowed-packages)
+ (progn
+ (when (eq cur-package 'async)
+ (fmakunbound 'async-byte-recompile-directory))
+ (package-activate-1 pkg-desc)
+ (load "async-bytecomp") ; emacs-24.3 don't reload new files.
+ (async-byte-recompile-directory (package-desc-dir pkg-desc) t))
+ ad-do-it)))
+
(provide 'async-bytecomp)
- [elpa] master 348600d 138/187: Unbound async-byte-recompile-directory when reinstalling async., (continued)
- [elpa] master 348600d 138/187: Unbound async-byte-recompile-directory when reinstalling async., Michael Albinus, 2015/12/30
- [elpa] master 12235bd 156/187: * async-pkg.el: Update version number., Michael Albinus, 2015/12/30
- [elpa] master 2235bc9 135/187: Inject bytecomp variables (#44)., Michael Albinus, 2015/12/30
- [elpa] master c9fb3f5 147/187: async-bytecomp-allowed-packages should be a list of symbols., Michael Albinus, 2015/12/30
- [elpa] master 2b01ad8 137/187: Merge branch 'master' of github.com:jwiegley/emacs-async, Michael Albinus, 2015/12/30
- [elpa] master 98ef20d 162/187: Change mode-line face., Michael Albinus, 2015/12/30
- [elpa] master 2143217 159/187: Bind print-level and print-length (#48)., Michael Albinus, 2015/12/30
- [elpa] master 89f1ca6 133/187: Merge pull request #42 from mneilsen/master, Michael Albinus, 2015/12/30
- [elpa] master 1f5e89b 146/187: * async-bytecomp.el (package--compile): Fix typo., Michael Albinus, 2015/12/30
- [elpa] master 7625671 140/187: Async compile also dependendies (#46)., Michael Albinus, 2015/12/30
- [elpa] master d250e7b 139/187: Allow customizing which packages compile async (#46).,
Michael Albinus <=
- [elpa] master 51c598b 149/187: Add autoload cookie and make dired-async--modeline-mode internal., Michael Albinus, 2015/12/30
- [elpa] master 23edf9e 151/187: * dired-async.el (dired-async-mode): Fix group name., Michael Albinus, 2015/12/30
- [elpa] master c368125 155/187: * async-bytecomp.el: Add autoload cookies., Michael Albinus, 2015/12/30
- [elpa] master bedfa96 152/187: * dired-async.el: Fix compatibility with emacs-24.3., Michael Albinus, 2015/12/30
- [elpa] master 753d593 148/187: Allow enabling dired-async with a minor-mode., Michael Albinus, 2015/12/30
- [elpa] master cdbf622 157/187: No message on startup when quiet., Michael Albinus, 2015/12/30
- [elpa] master 4ab15f7 161/187: Merge pull request #50 from tarsius/master, Michael Albinus, 2015/12/30
- [elpa] master a97aa4c 166/187: Don't call package-activate-1 in package--compile., Michael Albinus, 2015/12/30
- [elpa] master 7616e0c 165/187: Check if pkg is member of package-archive-contents (#51)., Michael Albinus, 2015/12/30
- [elpa] master ee727e1 168/187: Add async to load-path when recompiling itself., Michael Albinus, 2015/12/30