From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11407: 24.0.96; Doc for lexical binding in Elisp manual Date: Fri, 4 May 2012 14:08:03 -0700 Message-ID: <097DFB0C9B894AD3B025768A0B7C0032@us.oracle.com> References: <0D926161E319481BA418EA6630D79622@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1336165765 5307 80.91.229.3 (4 May 2012 21:09:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 May 2012 21:09:25 +0000 (UTC) Cc: 11407@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 04 23:09:24 2012 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 1SQPkh-00082g-IG for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 May 2012 23:09:23 +0200 Original-Received: from localhost ([::1]:54308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQPkg-0005fL-HT for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 May 2012 17:09:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQPkc-0005f1-MT for bug-gnu-emacs@gnu.org; Fri, 04 May 2012 17:09:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQPka-0002zl-Se for bug-gnu-emacs@gnu.org; Fri, 04 May 2012 17:09:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQPka-0002zW-OQ for bug-gnu-emacs@gnu.org; Fri, 04 May 2012 17:09:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SQPmI-0003qz-5X for bug-gnu-emacs@gnu.org; Fri, 04 May 2012 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 May 2012 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11407 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 11407-submit@debbugs.gnu.org id=B11407.133616580814747 (code B ref 11407); Fri, 04 May 2012 21:11:02 +0000 Original-Received: (at 11407) by debbugs.gnu.org; 4 May 2012 21:10:08 +0000 Original-Received: from localhost ([127.0.0.1]:36408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQPlP-0003pn-OH for submit@debbugs.gnu.org; Fri, 04 May 2012 17:10:08 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:36893) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQPlM-0003pF-SX for 11407@debbugs.gnu.org; Fri, 04 May 2012 17:10:06 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q44L8ABG000690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 May 2012 21:08:11 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q44L88e7028493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 May 2012 21:08:10 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q44L87n1007545; Fri, 4 May 2012 16:08:07 -0500 Original-Received: from dradamslap1 (/10.159.172.28) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 04 May 2012 14:08:07 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac0qIIamqBZ6nRQjT8yrUriB+0ppsgAAPpuAAAYASTA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:59760 Archived-At: > > > (defun foo (arg) > > > (lexical-let ((beta (something))) > > > #'(lambda () (alpha arg beta)))) > > > > > Does the closure here treat ARG as lexically bound by the > > > `defun', or is ARG a dynamically bound free var in the lambda? > > > I believe the answer is that the value of ARG encapsulated > > > in the closure is the value that is passed as argument to foo. > > > > The behavior is largely the result of some accidental > > design decisions taken years ago in the implementation of > > lexical-let, and I have no intention to document the result. > > Surely, if `lexical-let' is to be used by users (see above), > they deserve a description of its behavior in this regard. > The behavior is, as I think you're agreeing, not obvious. Not to mention the additional reason that people converting code that uses `lexical-let' to use file-wide lexical behavior instead might in some cases need to be aware of this idiosyncratic behavior, to convert properly.