From 0be868d39b544a00f274eb03305b85f13386e5d2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 30 Nov 2017 12:38:13 -0800 Subject: [PATCH] A final fix to :ensure + :load-path Fixes https://github.com/jwiegley/use-package/issues/190 --- lisp/use-package/use-package.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 0d86cc00e99..748074ad115 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -1734,6 +1734,7 @@ this file. Usage: (declare (indent 1)) (unless (member :disabled args) (let ((name-symbol (if (stringp name) (intern name) name)) + (orig-args args) (args (use-package-normalize-plist name args))) (dolist (spec use-package-defaults) (setq args (use-package-sort-keywords @@ -1769,7 +1770,8 @@ this file. Usage: (append args '(:demand t)) args))) (when (and use-package-always-ensure - (plist-member args* :load-path)) + (plist-member args* :load-path) + (not (plist-member orig-args :ensure))) (plist-put args* :ensure nil)) (unless (plist-member args* :init) (plist-put args* :init nil))