From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: setq's with missing final arguments. Date: Sun, 22 Nov 2015 08:04:58 -0800 (PST) Message-ID: <859e666d-f5eb-4c04-87fb-0e5b1b315991@default> References: <20151122122657.GA2332@acm.fritz.box> <87egfi6nwh.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1448208335 4088 80.91.229.3 (22 Nov 2015 16:05:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Nov 2015 16:05:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?iso-8859-1?B?Sm9oYW4gQm9ja2flcmQ=?= , Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 22 17:05:22 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a0X8j-0007CS-Ly for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2015 17:05:21 +0100 Original-Received: from localhost ([::1]:56542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0X8j-0002bX-MD for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2015 11:05:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0X8X-0002ZV-M6 for emacs-devel@gnu.org; Sun, 22 Nov 2015 11:05:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0X8U-0005UR-Fd for emacs-devel@gnu.org; Sun, 22 Nov 2015 11:05:09 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:41988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0X8U-0005Tw-8n; Sun, 22 Nov 2015 11:05:06 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tAMG54bk031748 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 22 Nov 2015 16:05:05 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tAMG54gU010282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 22 Nov 2015 16:05:04 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tAMG547X000553; Sun, 22 Nov 2015 16:05:04 GMT In-Reply-To: <87egfi6nwh.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195032 Archived-At: > > In the setq, there is a missing argument after "bar". At the moment, > > the byte compiler just generates code to assign nil to bar, without > > giving any warning. IMAO, this is Very Bad. >=20 > This is bug#20241. I'd forgotten that I filed that bug. ;-) I disagree with the only reply to that bug report, however: From: Stefan Monnier > Beyond this particular occurrence, I think that a wrong-number-of-args > error should be raised when `setq' is called with an odd number of > arguments. At the very least the byte-compiler should warn about it, indeed. A warning is _no_ substitute for raising an error. Adding a warning for byte compilation is worse than doing nothing, IMO. The doc clearly says that an even number of args are _required_.