From: Thierry Volpiatto Date: Tue, 8 Sep 2015 13:06:26 +0000 (+0200) Subject: Add async to load-path when recompiling itself. X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/ee727e1a7762383634a0548eeb2d4e60bc30c84d Add async to load-path when recompiling itself. * async-bytecomp.el (package--compile): Do it. --- diff --git a/async-bytecomp.el b/async-bytecomp.el index dda71f236..f1b29a576 100644 --- a/async-bytecomp.el +++ b/async-bytecomp.el @@ -139,13 +139,17 @@ All *.elc files are systematically deleted before proceeding." async-bytecomp-allowed-packages))) (defadvice package--compile (around byte-compile-async) - (let ((cur-package (package-desc-name pkg-desc))) + (let ((cur-package (package-desc-name pkg-desc)) + (pkg-dir (package-desc-dir pkg-desc))) (if (or (equal async-bytecomp-allowed-packages '(all)) (memq cur-package (async-bytecomp-get-allowed-pkgs))) (progn (when (eq cur-package 'async) (fmakunbound 'async-byte-recompile-directory)) - (load "async-bytecomp") ; emacs-24.3 don't reload new files. + (when (and (string= cur-package "async") + (not (member pkg-dir load-path))) + (push pkg-dir load-path)) + (load "async-bytecomp") (async-byte-recompile-directory (package-desc-dir pkg-desc) t)) ad-do-it)))