]> git.eshelyaron.com Git - emacs.git/commitdiff
Add to the load-path before the :preface
authorJohn Wiegley <johnw@newartisans.com>
Mon, 16 Mar 2015 17:19:14 +0000 (12:19 -0500)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 16 Mar 2015 17:19:14 +0000 (12:19 -0500)
Fixes https://github.com/jwiegley/use-package/issues/172

lisp/use-package/use-package.el

index e77ff96dc5eac9436cbab80519ccf023158a1579..224eb375028d8bc207ab676cb5d1d5a496f6740d 100644 (file)
@@ -441,12 +441,13 @@ possible."
 
     ;; Return the main body of the macro
     (use-package-cat-maybes
-     (list (plist-get args :preface))
-
      ;; Setup the load-path
-     (mapcar #'(lambda (path) `(add-to-list 'load-path ,path))
+     (mapcar #'(lambda (path)
+                 `(eval-and-compile (add-to-list 'load-path ,path)))
              (plist-get args :load-path))
 
+     (list (plist-get args :preface))
+
      ;; Setup any required autoloads
      (if defer-loading
          (delete nil