From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: setq's with missing final arguments. Date: Sun, 22 Nov 2015 14:23:02 +0100 Message-ID: <87d1v29nih.fsf@fencepost.gnu.org> References: <20151122122657.GA2332@acm.fritz.box> <87egfi5h8i.fsf@igel.home> <87h9ke9o6x.fsf@fencepost.gnu.org> <87a8q65gd6.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448198599 23804 80.91.229.3 (22 Nov 2015 13:23:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Nov 2015 13:23:19 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 22 14:23:17 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 1a0Ubt-0004qP-0u for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2015 14:23:17 +0100 Original-Received: from localhost ([::1]:56036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0Ubs-0002N4-JR for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2015 08:23:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0Ubg-0002M8-Hf for emacs-devel@gnu.org; Sun, 22 Nov 2015 08:23:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0Ubf-0004ll-Li for emacs-devel@gnu.org; Sun, 22 Nov 2015 08:23:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0Ubf-0004lh-Iq; Sun, 22 Nov 2015 08:23:03 -0500 Original-Received: from localhost ([127.0.0.1]:56567 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1a0Ube-0007OD-RS; Sun, 22 Nov 2015 08:23:03 -0500 Original-Received: by lola (Postfix, from userid 1000) id 7A221DF5F8; Sun, 22 Nov 2015 14:23:02 +0100 (CET) In-Reply-To: <87a8q65gd6.fsf@igel.home> (Andreas Schwab's message of "Sun, 22 Nov 2015 14:11:01 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:195009 Archived-At: Andreas Schwab writes: > David Kastrup writes: > >> Andreas Schwab writes: >> >>> Alan Mackenzie writes: >>> >>>> Hello, Emacs. >>>> >>>> Consider this file: >>>> >>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >>>> (defvar foo t) >>>> (defvar bar t) >>>> >>>> (defun bad-setq () >>>> "Doc string" >>>> (setq foo 5 >>>> bar)) >>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >>>> >>>> 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. >>> >>> But consistent with how setq works. >> >> How so? > > Where did I say "documented"? I don't see the point in pointing out that the bad actual behavior Alan points out is consistent with the bad actual behavior Alan points out. Presumably you mean that this afflicts both byte compiler and interpreter. But that's really beside the point and does not magically make it a good idea. -- David Kastrup