summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-03-15 02:49:09 -0400
committerJohn Wiegley <johnw@newartisans.com>2015-03-15 02:49:09 -0400
commita6edb081226f6e1331df0d679c4064c5ab09d95a (patch)
tree5a1a031434e625a5b66663e49247c96260f3ba64
parent9748de389c3696d4d5445e2e826216c66277ef4e (diff)
parente68d00d525934fbadc0cde3f5150f79b366e36db (diff)
downloademacs-a6edb08122.tar.gz
Merge pull request from thomasf/master
Fix :ensure value interpretation GitHub-reference: https://github.com/jwiegley/use-package/issues/163
-rw-r--r--lisp/use-package/use-package.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el
index 0d295d192bb..72550d0d35d 100644
--- a/lisp/use-package/use-package.el
+++ b/lisp/use-package/use-package.el
@@ -234,12 +234,22 @@ then the expanded macros do their job silently."
(use-package-as-one (symbol-name head) args
#'use-package-normalize-symbols))
- ((or :defer :demand :disabled :ensure)
+ ((or :defer :demand :disabled)
(if (null args)
t
(use-package-only-one (symbol-name head) args
#'use-package-normalize-value)))
+ (:ensure
+ (use-package-only-one (symbol-name head) args
+ (if (null args)
+ t
+ (lambda (label arg)
+ (if (symbolp arg)
+ arg
+ (use-package-error
+ ":ensure wants an optional package name (a unquoted symbol name)"))))))
+
((or :if :when :unless)
(use-package-only-one (symbol-name head) args
#'use-package-normalize-value))