summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/cl-lib-tests.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-11-27 12:45:16 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2017-11-27 12:45:16 -0500
commitcea0bca54f1fa3635591e24eba1017742b04abd0 (patch)
treee8e0c6051b9b48a83d25548d91e4ef775b05120c /test/lisp/emacs-lisp/cl-lib-tests.el
parente896320f0e0c50aa31712b7f1bda4c4a78ff0f82 (diff)
downloademacs-cea0bca54f1fa3635591e24eba1017742b04abd0.tar.gz
* lisp/emacs-lisp/cl-macs.el: Fix &key with no key arg
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-empty-keyargs): New test. * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Fix it.
Diffstat (limited to 'test/lisp/emacs-lisp/cl-lib-tests.el')
-rw-r--r--test/lisp/emacs-lisp/cl-lib-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el
index 13c9af9bd6d..ed85f5a0f66 100644
--- a/test/lisp/emacs-lisp/cl-lib-tests.el
+++ b/test/lisp/emacs-lisp/cl-lib-tests.el
@@ -201,6 +201,10 @@
:b :a :a 42)
'(42 :a))))
+(ert-deftest cl-lib-empty-keyargs ()
+ (should-error (funcall (cl-function (lambda (&key) 1))
+ :b 1)))
+
(cl-defstruct (mystruct
(:constructor cl-lib--con-1 (&aux (abc 1)))
(:constructor cl-lib--con-2 (&optional def) "Constructor docstring."))