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 ( . )" + " 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)))) diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index d3deef995b1..00682e9e0fc 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -32,6 +32,8 @@ (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