diff options
author | Gerd Möllmann <gerd@gnu.org> | 2022-10-23 10:14:10 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-11-11 14:13:46 +0100 |
commit | 6d9065b7487f35297994117bb1144f46ffa45313 (patch) | |
tree | 303d1aca8b4a0210d0140331d3c7c0d5bfb6da88 /test/lisp/emacs-lisp | |
parent | c64d94c84979425665b9ca88c1cad5830d2fabe0 (diff) | |
download | emacs-6d9065b7487f35297994117bb1144f46ffa45313.tar.gz emacs-6d9065b7487f35297994117bb1144f46ffa45313.tar.bz2 emacs-6d9065b7487f35297994117bb1144f46ffa45313.zip |
Fix &key parameters called without arguments (bug#58714)
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/cl-macs-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el index f742637ee35..160ac591130 100644 --- a/test/lisp/emacs-lisp/cl-macs-tests.el +++ b/test/lisp/emacs-lisp/cl-macs-tests.el @@ -803,4 +803,10 @@ See Bug#57915." (macroexpand form) (should (string-empty-p messages)))))))) +(ert-deftest cl-&key-arguments () + (cl-flet ((fn (&key x) x)) + (should-error (fn :x)) + (should (eq (fn :x :a) :a)))) + + ;;; cl-macs-tests.el ends here |