From: Noam Postavsky <npostavs@gmail.com>
To: 濱田和明 <hmd24kaz@gmail.com>
Cc: 33150@debbugs.gnu.org
Subject: bug#33150: 27.0.50; defun, keyword option
Date: Thu, 25 Oct 2018 18:14:20 -0400 [thread overview]
Message-ID: <87o9bhllmr.fsf@gmail.com> (raw)
In-Reply-To: <5bd17240.1c69fb81.b5b50.1535@mx.google.com> ("濱田和明"'s message of "Thu, 25 Oct 2018 16:35:25 +0900")
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").
prev parent reply other threads:[~2018-10-25 22:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 7:35 bug#33150: 27.0.50; defun, keyword option 濱田和明
2018-10-25 22:14 ` Noam Postavsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o9bhllmr.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=33150@debbugs.gnu.org \
--cc=hmd24kaz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.