From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24913: 25.1.50; Emacs accepts undocumented and confusing combinations of &optional and &rest in argument lists Date: Fri, 18 Nov 2016 11:06:33 +0200 Message-ID: <831sy9duna.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1479460033 20060 195.159.176.226 (18 Nov 2016 09:07:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2016 09:07:13 +0000 (UTC) Cc: 24913@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 18 10:07:10 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7f8X-0004ND-4A for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 10:07:09 +0100 Original-Received: from localhost ([::1]:35263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7f8a-00031a-8k for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 04:07:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7f8U-00030j-T6 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 04:07:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7f8P-0007HX-V3 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 04:07:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45919) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7f8P-0007HT-Re for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 04:07:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7f8P-0001ej-MQ for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 04:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2016 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24913 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24913-submit@debbugs.gnu.org id=B24913.14794600036341 (code B ref 24913); Fri, 18 Nov 2016 09:07:01 +0000 Original-Received: (at 24913) by debbugs.gnu.org; 18 Nov 2016 09:06:43 +0000 Original-Received: from localhost ([127.0.0.1]:33085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7f87-0001eD-B6 for submit@debbugs.gnu.org; Fri, 18 Nov 2016 04:06:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7f85-0001dz-D6 for 24913@debbugs.gnu.org; Fri, 18 Nov 2016 04:06:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7f7v-0007EM-EC for 24913@debbugs.gnu.org; Fri, 18 Nov 2016 04:06:36 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7f7v-0007EI-B4; Fri, 18 Nov 2016 04:06:31 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2312 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c7f7s-00055d-R2; Fri, 18 Nov 2016 04:06:29 -0500 In-reply-to: (message from Philipp Stephani on Thu, 10 Nov 2016 12:58:39 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125821 Archived-At: > From: Philipp Stephani > Date: Thu, 10 Nov 2016 12:58:39 +0000 > > Philipp Stephani 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.