diff options
author | Noam Postavsky <npostavs@gmail.com> | 2016-08-05 18:43:34 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2016-10-31 08:49:21 -0400 |
commit | 9688d2f64bd01b86a98ccd87138e6fc0a345e62b (patch) | |
tree | d30c08aa47881e969f2bda0500a734777d8f8efb /lisp/use-package/use-package.el | |
parent | 65c7b42a14c5ad42d4b6c6e6547c793e0ccbfe80 (diff) | |
download | emacs-9688d2f64bd01b86a98ccd87138e6fc0a345e62b.tar.gz emacs-9688d2f64bd01b86a98ccd87138e6fc0a345e62b.tar.bz2 emacs-9688d2f64bd01b86a98ccd87138e6fc0a345e62b.zip |
Don't allow implicit package name arg for binders
It's unlikely that
(use-package foopkg :bind "<some-key>")
intendes to bind <some-key> to 'foopkg command.
Diffstat (limited to 'lisp/use-package/use-package.el')
-rw-r--r-- | lisp/use-package/use-package.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 96137c3c78d..f99a3767777 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -712,6 +712,10 @@ If RECURSED is non-nil, recurse into sublists." (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)))) |