From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tomohiro Matsuyama Newsgroups: gmane.emacs.devel Subject: Re: Should lexical-let use let in the situation lexical-binding is t ? Date: Sat, 22 Sep 2012 03:18:24 +0900 Message-ID: <20120922031824.e7f584613ca22d1a7ed32eba@cx4a.org> References: <20120918192807.6a426ea58372355516a2ea50@cx4a.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1348251526 12113 80.91.229.3 (21 Sep 2012 18:18:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 18:18:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 21 20:18:50 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 1TF7oN-0000lq-5G for ged-emacs-devel@m.gmane.org; Fri, 21 Sep 2012 20:18:47 +0200 Original-Received: from localhost ([::1]:41617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF7oI-00082T-JU for ged-emacs-devel@m.gmane.org; Fri, 21 Sep 2012 14:18:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF7o8-0007yA-S5 for emacs-devel@gnu.org; Fri, 21 Sep 2012 14:18:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF7o4-0001h4-TU for emacs-devel@gnu.org; Fri, 21 Sep 2012 14:18:32 -0400 Original-Received: from www6399u.sakura.ne.jp ([59.106.183.193]:54163 helo=cx4a.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF7o4-0001gk-KF for emacs-devel@gnu.org; Fri, 21 Sep 2012 14:18:28 -0400 Original-Received: from thinkpad (p18054-ipngn1501hodogaya.kanagawa.ocn.ne.jp [114.167.1.54]) by cx4a.org (Postfix) with ESMTPSA id 0F52ED893E; Sat, 22 Sep 2012 03:18:24 +0900 (JST) In-Reply-To: X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 59.106.183.193 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:153442 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) so we could do > that, but only after checking that the lexical-let-bound variable is not > defvar'd, and this requires checking byte-compile-bound-variables, so it's > rather ugly to do from a macro. I'm very convinced by your example. Thank you! By the way, isn't it possible to check if the symbol is declared as special or not by accessing declared_special field of the symbol? Regards, Tomohiro