From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Should lexical-let use let in the situation lexical-binding is t ? Date: Tue, 18 Sep 2012 20:41:30 -0400 Message-ID: References: <20120918192807.6a426ea58372355516a2ea50@cx4a.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1348015299 14831 80.91.229.3 (19 Sep 2012 00:41:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2012 00:41:39 +0000 (UTC) Cc: tomo@cx4a.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 19 02:41:43 2012 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 1TE8MJ-0004ro-Gv for ged-emacs-devel@m.gmane.org; Wed, 19 Sep 2012 02:41:43 +0200 Original-Received: from localhost ([::1]:47864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TE8ME-0007fS-PQ for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2012 20:41:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TE8MB-0007f0-LL for emacs-devel@gnu.org; Tue, 18 Sep 2012 20:41:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TE8MA-0002mO-RO for emacs-devel@gnu.org; Tue, 18 Sep 2012 20:41:35 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:45998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TE8MA-0002mH-NP; Tue, 18 Sep 2012 20:41:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al8FAG6Zu09Ld+qU/2dsb2JhbABEsX2CFIEIghUBAQQBViMFCws0EhQYDYhABboJjSaDHgOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="198676451" Original-Received: from 75-119-234-148.dsl.teksavvy.com (HELO pastel.home) ([75.119.234.148]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Sep 2012 20:41:31 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 284BB59104; Tue, 18 Sep 2012 20:41:30 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Tue, 18 Sep 2012 18:42:39 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:153387 Archived-At: > As mentioned in my reply there, the two aren't quite compatible (because > (lexical-let ((tab-width 4)) foo) will be a lexical binding, whereas > (let ((tab-width 4)) foo) will be a dynamic binding) > Is it really a sensible thing to make a lexical binding for a variable > that is normally dynamic? We don't need to answer this question, because the difference between `let' and `lexical-let' in this respect is more likely to be accidental. This said, there can be good reasons to force a lexical binding, when you fear that the code might be run in a context where the variable might happen to be defvar'd. Stefan