* bug#33150: 27.0.50; defun, keyword option
@ 2018-10-25 7:35 濱田和明
2018-10-25 22:14 ` Noam Postavsky
0 siblings, 1 reply; 2+ messages in thread
From: 濱田和明 @ 2018-10-25 7:35 UTC (permalink / raw)
To: 33150
[-- Attachment #1: Type: text/plain, Size: 3458 bytes --]
(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.
In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32)
of 2018-10-20 built on INTELLIFROG
Repository revision: 32e411943d3f1d1546bfcb1aad8c4d4cd28857d6
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
System Description: Microsoft Windows 10 Home (v10.0.1803.17134.345)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Entering debugger...
Mark set
Back to top level
Making completion list...
Configured using:
'configure --prefix=/usr/local/share/emacs
--exec-prefix=/usr/local/share/emacs --with-sound=no
--with-x-toolkit=no --with-toolkit-scroll-bars --without-lcms2
--without-libsystemd --without-imagemagick --without-json
--without-xaw3d --without-xim --with-zlib --with-w32 --without-gpm
--without-dbus --without-gsettings --without-selinux
CC=/mingw64/bin/gcc PKG_CONFIG_PATH=/mingw64/lib/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS GMP
Important settings:
value of $LANG: ENG
locale-coding-system: cp932
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print
debug backtrace help-mode easymenu find-func cl-loaddefs cl-lib
elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 multi-tty make-network-process emacs)
Memory information:
((conses 16 102756 9568)
(symbols 48 20419 1)
(strings 32 31376 2011)
(string-bytes 1 824605)
(vectors 16 15704)
(vector-slots 8 512238 13474)
(floats 8 52 236)
(intervals 56 364 0)
(buffers 992 15))
[-- Attachment #2: Type: text/html, Size: 7954 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#33150: 27.0.50; defun, keyword option
2018-10-25 7:35 bug#33150: 27.0.50; defun, keyword option 濱田和明
@ 2018-10-25 22:14 ` Noam Postavsky
0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2018-10-25 22:14 UTC (permalink / raw)
To: 濱田和明; +Cc: 33150
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").
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-25 22:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-25 7:35 bug#33150: 27.0.50; defun, keyword option 濱田和明
2018-10-25 22:14 ` Noam Postavsky
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.