GNU bug report logs - #24913
25.1.50; Emacs accepts undocumented and confusing combinations of &optional and &rest in argument lists

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Wed, 9 Nov 2016 21:19:02 UTC

Severity: minor

Found in version 25.1.50

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 24913-done <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24913-done <at> debbugs.gnu.org
Subject: Re: bug#24913: 25.1.50; Emacs accepts undocumented and confusing
 combinations of &optional and &rest in argument lists
Date: Fri, 18 Nov 2016 17:37:26 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Fr., 18. Nov. 2016 um 10:06 Uhr:

> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> > Date: Thu, 10 Nov 2016 12:58:39 +0000
> >
> > Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Mi., 9. Nov. 2016
> um 22:19 Uhr:
> >
> >  For example:
> >
> >  (funcall (lambda (&optional &rest &rest &optional x) (list x)) 'a)
> >  => ((a))
> >
> >  Obviously here the &rest keyword "wins", but I think that's overly
> >  confusing. Such an argument list is most likely a programmer mistake,
> >  and should signal an error to make the programmer aware of the mistake.
> >
> > Here's a patch that detects such argument lists.
>
> Thanks, please push to master.
>

Done.
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 238 days ago.

Previous Next


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