From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani 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 17:37:26 +0000 Message-ID: References: <831sy9duna.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114242620ec704054196c378 X-Trace: blaine.gmane.org 1479490701 16159 195.159.176.226 (18 Nov 2016 17:38:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2016 17:38:21 +0000 (UTC) Cc: 24913-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 18 18:38:16 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 1c7n79-0002m6-5z for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 18:38:15 +0100 Original-Received: from localhost ([::1]:38192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7n7C-0002Z8-IW for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 12:38:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7n72-0002Y0-04 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 12:38:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7n6x-0001OO-0D for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 12:38:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7n6w-0001OJ-TI for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 12:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7n6w-0000xQ-N0 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 12:38:02 -0500 Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2016 17:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 24913 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 24913@debbugs.gnu.org, p.stephani2@gmail.com, p.stephani2@gmail.com Original-Received: via spool by 24913-done@debbugs.gnu.org id=D24913.14794906643652 (code D ref 24913); Fri, 18 Nov 2016 17:38:02 +0000 Original-Received: (at 24913-done) by debbugs.gnu.org; 18 Nov 2016 17:37:44 +0000 Original-Received: from localhost ([127.0.0.1]:34171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7n6e-0000wq-1B for submit@debbugs.gnu.org; Fri, 18 Nov 2016 12:37:44 -0500 Original-Received: from mail-wm0-f46.google.com ([74.125.82.46]:34701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7n6c-0000wb-NT for 24913-done@debbugs.gnu.org; Fri, 18 Nov 2016 12:37:43 -0500 Original-Received: by mail-wm0-f46.google.com with SMTP id u144so7550582wmu.1 for <24913-done@debbugs.gnu.org>; Fri, 18 Nov 2016 09:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+/a+Vi1jhMrW3YJ31VRBLmqOAN2PTt7ZhRlTHH+8lbU=; b=WhlO4rJEJu86ktA/Cq/L+WJmphuDbKmY90tTrNSS2Wb+77+E1dCN6wl/sLTvdYppfa V1B9DhF8lNgdqYnCspQeM2KyGZTBq5q5ma0Vf5sf661pGlUCH7X3qojrJ3WKNaQA8j79 8jxEGeGKNQ61WamEyvG9HhFrhaekq8AubpKRHzArd0Lbjtrxpvum7XwFJC3bUQLzCPSV BqC6akwR2e63Ep+FeBNmRHAjNXnNc2p72OcvEq68l1/zzv+IfbxFMztxBAWLoU6QHXz3 YEWK7JOL6HxZf3YlCe45v3XTt+rjRDocxXIOBJEM7e/UXsnApTnUEATsxLe/7vfIo6Od Im3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+/a+Vi1jhMrW3YJ31VRBLmqOAN2PTt7ZhRlTHH+8lbU=; b=PI3EulQ9ZQ4G5F/HA90iiKg/iTmYlQiUlvQTiAUgm6EYjhVN7gWb1zF/kmm+Rsh/dS JB96k9RbuIDxACU089kIBTgUYiu07CijzpZCB69MEY4gIsPNML1YSy770SO9zTcWg+xO Ufh8E2RvlcG6MvM7RGURS+A8b25gCOZf+iMA6h7wjpQu8dJBCkRSAE2Pt53l8E1Ef+p+ t3HcCQ5YSuwFydBcWy5bs3EdiAgZws9KdIc/IbPdOLnqeh4jyCthqrG0GgXhKOoz8db9 o31lKTjoaxZ8YQnejgaC7cL1ILxRqlCl1MCDg/Zf2s8QdlkaoUchdeAUPcYZap5vYyJ3 qqOw== X-Gm-Message-State: AKaTC02Cvbw2Mq/pr6gZ31qF/1Bhtx9ZbkQ6/RH88wetLYiQ4CjGW/23gmthci04/QfV9Xhk8DWpaK2BN+L0Hg== X-Received: by 10.28.129.81 with SMTP id c78mr1497438wmd.94.1479490656976; Fri, 18 Nov 2016 09:37:36 -0800 (PST) In-Reply-To: <831sy9duna.fsf@gnu.org> 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:125841 Archived-At: --001a114242620ec704054196c378 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Fr., 18. Nov. 2016 um 10:06 Uhr: > > 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. > Done. --001a114242620ec704054196c378 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Fr., 18. Nov. 2016 um 10:06=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Thu, 10 Nov 2016 12:58:39 +0000
>
> Philipp Stephani <p.stephani2@gmail.com> schrieb am Mi.,= 9. Nov. 2016 um 22:19 Uhr:
>
>=C2=A0 For example:
>
>=C2=A0 (funcall (lambda (&optional &rest &rest &optiona= l x) (list x)) 'a)
>=C2=A0 =3D> ((a))
>
>=C2=A0 Obviously here the &rest keyword "wins", but I thi= nk that's overly
>=C2=A0 confusing. Such an argument list is most likely a programmer mis= take,
>=C2=A0 and should signal an error to make the programmer aware of the m= istake.
>
> Here's a patch that detects such argument lists.

Thanks, please push to master.
Done.=C2=A0
--001a114242620ec704054196c378--