From: John Wiegley Date: Thu, 30 Nov 2017 06:10:01 +0000 (-0800) Subject: Using :load-path without also using :ensure now implies :ensure nil X-Git-Tag: emacs-29.0.90~1306^2~15^2~224 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e1a656e06;p=emacs.git Using :load-path without also using :ensure now implies :ensure nil Fixes https://github.com/jwiegley/use-package/issues/190 --- 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)