branch: master
commit 1ddb3a0195053f49d97b851d501b5eb31d6f31cb
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Add to load-path and load only async.
* async-bytecomp.el (package--compile): Do it, add comments.
---
async-bytecomp.el | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/async-bytecomp.el b/async-bytecomp.el
index f1b29a5..53d288d 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -146,10 +146,13 @@ All *.elc files are systematically deleted before
proceeding."
(progn
(when (eq cur-package 'async)
(fmakunbound 'async-byte-recompile-directory))
- (when (and (string= cur-package "async")
- (not (member pkg-dir load-path)))
- (push pkg-dir load-path))
- (load "async-bytecomp")
+ ;; Add to `load-path' the latest version of async and
+ ;; reload it when reinstalling async.
+ (when (string= cur-package "async")
+ (cl-pushnew pkg-dir load-path)
+ (load "async-bytecomp"))
+ ;; `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)))