From: Noam Postavsky Date: Fri, 16 Aug 2013 01:35:38 +0000 (-0400) Subject: also check `byte-compile-current-file' for compile time loads, fixes issue X-Git-Tag: emacs-29.0.90~1306^2~15^2~446^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48975f791b;p=emacs.git also check `byte-compile-current-file' for compile time loads, fixes issue `eval-when-compile' is really `eval-when-macroexpand' which includes loading from source GitHub-reference: https://github.com/jwiegley/use-package/issues/44 --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 72e287c376a..8077f2e8798 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -582,10 +582,11 @@ For full documentation. please see commentary. pkg-load-path))) (eval-when-compile - ,@defines-eval - ,(if (stringp name) - `(load ,name t) - `(require ',name nil t))) + (when (bound-and-true-p byte-compile-current-file) + ,@defines-eval + ,(if (stringp name) + `(load ,name t) + `(require ',name nil t)))) ,(when (boundp 'el-get-sources) (require 'el-get)