GNU bug report logs - #33150
27.0.50; defun, keyword option

Previous Next

Package: emacs;

Reported by: 濱田和明 <hmd24kaz <at> gmail.com>

Date: Thu, 25 Oct 2018 15:21:02 UTC

Severity: normal

Tags: notabug

Found in version 27.0.50

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33150 in the body.
You can then email your comments to 33150 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33150; Package emacs. (Thu, 25 Oct 2018 15:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 濱田和明 <hmd24kaz <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 25 Oct 2018 15:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 濱田和明 <hmd24kaz <at> gmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 27.0.50; defun, keyword option
Date: Thu, 25 Oct 2018 16:35:25 +0900
[Message part 1 (text/plain, inline)]
(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))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33150; Package emacs. (Thu, 25 Oct 2018 22:15:01 GMT) Full text and rfc822 format available.

Message #8 received at 33150 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: 濱田和明 <hmd24kaz <at> gmail.com>
Cc: 33150 <at> debbugs.gnu.org
Subject: Re: bug#33150: 27.0.50; defun, keyword option
Date: Thu, 25 Oct 2018 18:14:20 -0400
tags 33150 notabug
close 33150
quit

濱田和明 <hmd24kaz <at> 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").




Added tag(s) notabug. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 25 Oct 2018 22:15:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 33150 <at> debbugs.gnu.org and 濱田和明 <hmd24kaz <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 25 Oct 2018 22:15:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.