Subject: Re: bug#33150: 27.0.50; defun, keyword option

From: Noam Postavsky <[email-masked]>
Date: Thu, 25 Oct 2018 18:14:20 -0400

tags 33150 notabug
close 33150
quit

濱田和明 <[email-masked]> writes:

> (defun test-f (&key a b)
>   (or a b))
> -> test-f
> (test-f :a 1)
> There happen an error: (wrong-number-of-arguments (lambda (&key a b) (or
> a b)) 2)
> I am expecting the return value is 1.

You're looking for cl-defun, plain Emacs Lisp defun doesn't support &key
(so you defined a function of three args, where the first arg is called
"&key").