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 15:40:30 +0000 Message-ID: <20151125154030.GF2007@acm.fritz.box> References: <20151123193138.GG2004@acm.fritz.box> <20151124180452.GB1840@acm.fritz.box> <20151124210956.GC1840@acm.fritz.box> <20151125094155.GB2007@acm.fritz.box> <20151125110755.GC2007@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448465974 5547 80.91.229.3 (25 Nov 2015 15:39:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 15:39:34 +0000 (UTC) Cc: John Wiegley , 20241@debbugs.gnu.org, Artur Malabarba To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 16:39:22 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 1a1cA2-0001Lo-1k for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 16:39:10 +0100 Original-Received: from localhost ([::1]:46016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1cA3-0006l3-Po for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 10:39:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1c9y-0006hX-FZ for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 10:39:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1c9u-0003Cu-Eh for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 10:39:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1c9u-0003Co-Bc for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 10:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1c9u-0000Yo-3N for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 10:39:02 -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 15:39:02 +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.14484659292119 (code B ref 20241); Wed, 25 Nov 2015 15:39:02 +0000 Original-Received: (at 20241) by debbugs.gnu.org; 25 Nov 2015 15:38:49 +0000 Original-Received: from localhost ([127.0.0.1]:52920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1c9h-0000Y7-0N for submit@debbugs.gnu.org; Wed, 25 Nov 2015 10:38:49 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:29886) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1c9L-0000Xb-R9 for 20241@debbugs.gnu.org; Wed, 25 Nov 2015 10:38:46 -0500 Original-Received: (qmail 73776 invoked by uid 3782); 25 Nov 2015 15:38:26 -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 16:38:24 +0100 Original-Received: (qmail 22275 invoked by uid 1000); 25 Nov 2015 15:40:30 -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:109234 Archived-At: Hello, Drew. On Wed, Nov 25, 2015 at 07:18:17AM -0800, Drew Adams wrote: > > If you found four occurrences merely by grepping, there could well be > > quite a few more. In the last one, for example, can we be sure that nil > > is intended, not that the real argument has just been missed out? > If you cannot now analyze the code properly to determine TRT, or > contact the author to make that determination, then do the obvious > (IMO): Assign a `nil' value explicitly where it is now assigned > implicitly. That would be the worst thing: it would leave the code possibly failing exactly the way it did, but remove the evidence (which can be mechanically found). > AND flag that amended code with a comment saying what you've done, > and that you don't currently know whether (a) there is a bug here > or (b) `nil' is really what is needed. Comments are less good than error messages from the byte compiler! > IOW: (1) At least just ensure that the code does the same thing > that it does now, but respects the intended meaning of `setq'. > (2) If you have to punt the careful analysis for later or for > someone else, then add a comment to that effect. > > Maybe having the byte compiler error out in this situation isn't such a > > brilliant idea after all. > IMO, the bug should be fixed to raise an _error at runtime_, for > both interpreted and byte-compiled code. I've just tried it out. The byte compiler generates an error message, but the .elc is written anyway. No runtime error happens from such compiled code. But running it interpreted would signal an error. > Whatever else the byte-compiler might do is less important, as > long as it produces code that is comparable - e.g., code that > will also raise an _error at runtime_. It currently doesn't do that. I'm not convinced it should, either. > It's OK for a byte-compiler to be smart, but not smarter than > the actual source code ;-). It should pretty much try to > produce code that does the same thing, but hopefully usually > does it quicker. Why is this topic suddenly seeming complicated? :-( -- Alan Mackenzie (Nuremberg, Germany).