[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33150: 27.0.50; defun, keyword option
From: |
Noam Postavsky |
Subject: |
bug#33150: 27.0.50; defun, keyword option |
Date: |
Thu, 25 Oct 2018 18:14:20 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
tags 33150 notabug
close 33150
quit
濱田和明 <hmd24kaz@gmail.com> 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").