From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Date: Thu, 2 Jun 2011 15:41:32 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1307024184 9219 80.91.229.12 (2 Jun 2011 14:16:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2011 14:16:24 +0000 (UTC) Cc: 8711@debbugs.gnu.org, Helmut Eller To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 02 16:16:19 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8h9-0003N8-3z for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2011 16:16:19 +0200 Original-Received: from localhost ([::1]:47489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8h7-00006B-Ta for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2011 10:16:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8Az-00005H-Gn for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2011 09:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QS8Ax-0003LL-Qm for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2011 09:43:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8Ax-0003LF-Gm for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2011 09:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QS8Aw-00062w-HT; Thu, 02 Jun 2011 09:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jun 2011 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8711 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8711-submit@debbugs.gnu.org id=B8711.130702214023193 (code B ref 8711); Thu, 02 Jun 2011 13:43:02 +0000 Original-Received: (at 8711) by debbugs.gnu.org; 2 Jun 2011 13:42:20 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8AF-000622-II for submit@debbugs.gnu.org; Thu, 02 Jun 2011 09:42:19 -0400 Original-Received: from mail-gw0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8AE-00061q-7Y for 8711@debbugs.gnu.org; Thu, 02 Jun 2011 09:42:18 -0400 Original-Received: by gwb20 with SMTP id 20so346420gwb.3 for <8711@debbugs.gnu.org>; Thu, 02 Jun 2011 06:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=FGfP16zjzJHMKZFHJXr6/vzDljTQ98Gqi1Urwm3V/Jk=; b=TwuNWlp6ZbSEp4CMayPyfCPjVZe89gdenDxLxr9+N9FffRZzpygPfq01rfT6dSbiQ0 el7j+xrWiJvSZOJfYBz2dWIHpYfIuj346tSq2BM8xydSHcDKMU8bazaHz0Y+hdfl3U4l BRDq7vSB6q8Q8UZB0Hc+MBvcsnE7Br8QOFfYo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ldhncYxNYO8dbEMt/7WBtUp7Vu2m+BCVHbcLMznjax1a+6Rl2gHkcXYXaOJifzM+VK mbPNP2tEUWGBs32q1UdbOuVed/1hbbqpibma0QnnpaauhZgCNCgv7X+2g6N8Y6N3zWNi 8Zq5JMfOFAH2Ad8QGWPYDWhouLp3EBaTkVA7Q= Original-Received: by 10.150.170.2 with SMTP id s2mr778479ybe.16.1307022132299; Thu, 02 Jun 2011 06:42:12 -0700 (PDT) Original-Received: by 10.146.82.11 with HTTP; Thu, 2 Jun 2011 06:41:32 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 02 Jun 2011 09:43:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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:46890 Archived-At: On Thu, Jun 2, 2011 at 14:45, Stefan Monnier wro= te: > That's how dolist/dotimes are defined in Common-Lisp, hence that's > how it works in cl-macs. =C2=A0The subr versions also do it because when = we > introduced them, some people brought up the issue and it seemed there > was no point in being incompatible. I wonder what kind of code (other than a specific test) makes this incompatibility noticeable in the first place... but I digress ;-) > Yes, I do find it very odd as well, but CLHS says clearly "At the time > result-form is processed, var is bound to nil". Silly me, I should've checked the CLHS. I would still be puzzled, but at least not by Emacs. > Or she can just use different names rather than reusing the same > variable name. Yeah, that too. >> so setting it to nil in the (dolist (VAR LIST RESULT) ...) case does >> not bring any clear benefit, even in the non-lexical case. > > Agreed. Well, at the very least that's something that could/should be optimized away (at some point in the future, I mean) in the lexical-binding case (I think we already have some macros that expand to different code for lexical and non-lexical compilations?). Meanwhile, will you complain if I change that particular case (in doc-view.el) to be like (let (...) (dolist (var list) ...) result) to avoid the warning? =C2=A0 =C2=A0 Juanma