aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2017-11-27 12:45:16 -0500
committerStefan Monnier2017-11-27 12:45:16 -0500
commitcea0bca54f1fa3635591e24eba1017742b04abd0 (patch)
treee8e0c6051b9b48a83d25548d91e4ef775b05120c /test
parente896320f0e0c50aa31712b7f1bda4c4a78ff0f82 (diff)
downloademacs-cea0bca54f1fa3635591e24eba1017742b04abd0.tar.gz
emacs-cea0bca54f1fa3635591e24eba1017742b04abd0.zip
* 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')
-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 @@
201 :b :a :a 42) 201 :b :a :a 42)
202 '(42 :a)))) 202 '(42 :a))))
203 203
204(ert-deftest cl-lib-empty-keyargs ()
205 (should-error (funcall (cl-function (lambda (&key) 1))
206 :b 1)))
207
204(cl-defstruct (mystruct 208(cl-defstruct (mystruct
205 (:constructor cl-lib--con-1 (&aux (abc 1))) 209 (:constructor cl-lib--con-1 (&aux (abc 1)))
206 (:constructor cl-lib--con-2 (&optional def) "Constructor docstring.")) 210 (:constructor cl-lib--con-2 (&optional def) "Constructor docstring."))