From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#20241: 25.0.50; `setq' with only one argument Date: Wed, 25 Nov 2015 20:58:51 +0000 Message-ID: <20151125205851.GJ2007@acm.fritz.box> References: <20151125110755.GC2007@acm.fritz.box> <20151125154030.GF2007@acm.fritz.box> <20151125172211.GH2007@acm.fritz.box> <5c5c14de-444e-4847-b91a-e7dff29b3f58@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448485103 6779 80.91.229.3 (25 Nov 2015 20:58:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 20:58:23 +0000 (UTC) Cc: 20241@debbugs.gnu.org, Artur Malabarba To: John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 21:58:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1a1h8i-0005dP-5P for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 21:58:08 +0100 Original-Received: from localhost ([::1]:47661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1h8j-0001oQ-NV for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 15:58:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1h8f-0001o4-Eq for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 15:58:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1h8c-0000ia-7A for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 15:58:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1h8c-0000iV-3L for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 15:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1h8b-0001vr-N5 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 15:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Nov 2015 20:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20241-submit@debbugs.gnu.org id=B20241.14484850287363 (code B ref 20241); Wed, 25 Nov 2015 20:58:01 +0000 Original-Received: (at 20241) by debbugs.gnu.org; 25 Nov 2015 20:57:08 +0000 Original-Received: from localhost ([127.0.0.1]:53197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1h7j-0001uf-L6 for submit@debbugs.gnu.org; Wed, 25 Nov 2015 15:57:07 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:31129) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1h7P-0001ts-Kk for 20241@debbugs.gnu.org; Wed, 25 Nov 2015 15:57:06 -0500 Original-Received: (qmail 54695 invoked by uid 3782); 25 Nov 2015 20:56:46 -0000 Original-Received: from acm.muc.de (p5B146B74.dip0.t-ipconnect.de [91.20.107.116]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 25 Nov 2015 21:56:45 +0100 Original-Received: (qmail 23708 invoked by uid 1000); 25 Nov 2015 20:58:51 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109263 Archived-At: Hello, John. On Wed, Nov 25, 2015 at 11:40:15AM -0800, John Wiegley wrote: > >>>>> Artur Malabarba writes: > > This is a bug then (probably in the advertised-calling-convention of > > funcall). Functions called with the wrong number of arguments are usually > > reported as warnings by the byte-compiler. > Ok, let's go with this then: > Evaluation: Run-time error > Compilation: Compile-time warning > Execution: Run-time error (same as Evaluation) I can live with that. > I think that's the convergence point for the three of us, amirite? Things are never that simple. In evaluation, we now get the signal "wrong-number-of-args setq 17". The first eight set operations are not carried out. In compilation, currently a warning message (called an "Error") is emitted, and code is generated to perform 9 set operations (the last one to nil). This needs to change. How about enhancing the definition of setq to say that with 17 arguments, NONE of the assignments are done? This should be relatively straight forward to code up in the byte compiler, even in the lexical binding case. Or, alternatively, we could explicitly say that whether the first 8 assignments are carried out before signaling the error is undefined. This should deter over-clever hackers from trying to catch the wrong-number-of-args error, expecting the code to have done something predictable. > John -- Alan Mackenzie (Nuremberg, Germany).