From db69a3f81c0158cf9615dc3f19a6412d2b61446a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 16 Mar 2015 12:19:14 -0500 Subject: [PATCH] Add to the load-path before the :preface Fixes https://github.com/jwiegley/use-package/issues/172 --- lisp/use-package/use-package.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index e77ff96dc5e..224eb375028 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -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 -- 2.39.2