summaryrefslogtreecommitdiff
path: root/lisp/use-package
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-03-16 02:48:13 -0500
committerJohn Wiegley <johnw@newartisans.com>2015-03-16 02:48:13 -0500
commitb75c1cb47e7ca8bc37536eab6b9534f2c8ecbea4 (patch)
treeaceb6141cc08f5e5881408bbacce6957462107f7 /lisp/use-package
parent5c85433fac3d51f6df0a82d670b3c3a147d09164 (diff)
downloademacs-b75c1cb47e7ca8bc37536eab6b9534f2c8ecbea4.tar.gz
emacs-b75c1cb47e7ca8bc37536eab6b9534f2c8ecbea4.tar.bz2
emacs-b75c1cb47e7ca8bc37536eab6b9534f2c8ecbea4.zip
Allow :pin to accept a symbol
Diffstat (limited to 'lisp/use-package')
-rw-r--r--lisp/use-package/use-package.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el
index b843725eccb..638a16ee992 100644
--- a/lisp/use-package/use-package.el
+++ b/lisp/use-package/use-package.el
@@ -304,9 +304,12 @@ the user specified.")
(:pin
(use-package-only-one (symbol-name head) args
(lambda (label arg)
- (if (stringp arg)
- arg
- (use-package-error ":pin wants an archive name (a string)")))))
+ (cond
+ ((stringp arg) arg)
+ ((symbolp arg) (symbol-name arg))
+ (t
+ (use-package-error
+ ":pin wants an archive name (a string)"))))))
(_ (use-package-error (format "Unrecognized keyword: %s" head)))))
(use-package-normalize-plist name-symbol tail)))))