It's unlikely that
(use-package foopkg :bind "<some-key>")
intendes to bind <some-key> to 'foopkg command.
(defun use-package-normalize-binder (name keyword args)
(use-package-as-one (symbol-name keyword) args
(lambda (label arg)
+ (unless (consp arg)
+ (use-package-error
+ (concat label " a (<string or vector> . <symbol or string>)"
+ " or list of these")))
(use-package-normalize-pairs (lambda (k) (or (stringp k) (vectorp k)))
(lambda (b) (or (symbolp b) (stringp b)))
name label arg))))
(should (equal (use-package-normalize-binder
'foopkg :bind good-values)
good-values)))
+ (should-error (use-package-normalize-binder
+ 'foopkg :bind '("foo")))
(should-error (use-package-normalize-binder
'foopkg :bind '("foo" . 99)))
(should-error (use-package-normalize-binder