From 1ddb3a0195053f49d97b851d501b5eb31d6f31cb Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Tue, 8 Sep 2015 15:22:11 +0200 Subject: [PATCH] Add to load-path and load only async. * async-bytecomp.el (package--compile): Do it, add comments. --- async-bytecomp.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/async-bytecomp.el b/async-bytecomp.el index f1b29a576..53d288da7 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))) -- 2.39.2