From 5e1a656e06654d297c21dbf1c6ebb31696d3b4f9 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 29 Nov 2017 22:10:01 -0800 Subject: [PATCH] Using :load-path without also using :ensure now implies :ensure nil Fixes https://github.com/jwiegley/use-package/issues/190 --- etc/USE-PACKAGE-NEWS | 1 + lisp/use-package/use-package.el | 3 +++ 2 files changed, 4 insertions(+) diff --git a/etc/USE-PACKAGE-NEWS b/etc/USE-PACKAGE-NEWS index a4f20070e6a..b0265fa5515 100644 --- a/etc/USE-PACKAGE-NEWS +++ b/etc/USE-PACKAGE-NEWS @@ -27,6 +27,7 @@ - Support multiple symbols passed to `:after`, and a mini-DSL using `:all` and `:any`. - `:mode` and `:interpreter` can now accept `(rx ...)` forms. +- Using `:load-path` without also using `:ensure` now implies `:ensure nil`. - `:bind (:map foo-map ...)` now defers binding in the map until the package has been loaded. - Print key bindings for keymaps in `describe-personal-keybindings`. diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 5eb2b23936d..b07f205adc7 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -1764,6 +1764,9 @@ this file. Usage: (not (memq :defer args))) (append args '(:demand t)) args))) + (when (and (plist-member args* :load-path) + (not (plist-member args* :ensure))) + (plist-put args* :ensure nil)) (unless (plist-member args* :init) (plist-put args* :init nil)) (unless (plist-member args* :config) -- 2.39.2