]> git.eshelyaron.com Git - emacs.git/commitdiff
also check `byte-compile-current-file' for compile time loads, fixes issue
authorNoam Postavsky <npostavs@gmail.com>
Fri, 16 Aug 2013 01:35:38 +0000 (21:35 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 16 Aug 2013 01:35:38 +0000 (21:35 -0400)
`eval-when-compile' is really `eval-when-macroexpand' which includes
loading from source
GitHub-reference: https://github.com/jwiegley/use-package/issues/44

lisp/use-package/use-package.el

index 72e287c376aa3e4c6b23bddcc255c8e92c86620c..8077f2e8798606e0d3aee7eeb295091ef02e94ca 100644 (file)
@@ -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)