Fix the case where :ensure is given no arguments

Fixes https://github.com/jwiegley/use-package/issues/543
This commit is contained in:
John Wiegley 2017-12-04 16:46:46 -08:00
parent afdf1c3638
commit ee07e709ea
2 changed files with 9 additions and 1 deletions

View file

@ -134,7 +134,7 @@ manually updated package."
(defun use-package-normalize/:ensure (name keyword args)
(if (null args)
t
(list t)
(use-package-only-one (symbol-name keyword) args
#'(lambda (label arg)
(pcase arg

View file

@ -1469,6 +1469,14 @@
(ignore
(bind-keys :package mu4e ("<f9>" . mu4e))))))
(ert-deftest use-package-test/543 ()
(match-expansion
(use-package hydra
:ensure)
`(progn
(use-package-ensure-elpa 'hydra '(t) 'nil)
(require 'hydra nil nil))))
(ert-deftest bind-key/:prefix-map ()
(match-expansion
(bind-keys :prefix "<f1>"