From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "A.Politz" Newsgroups: gmane.emacs.help Subject: Re: lexical-let detail semantics Date: Mon, 27 Jul 2009 03:50:30 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7ca3351f-a372-4756-8777-bf87c003d1c2@e11g2000yqo.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1248694850 3399 80.91.229.12 (27 Jul 2009 11:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jul 2009 11:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 27 13:40:43 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MVOZO-0001A3-Pr for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jul 2009 13:40:43 +0200 Original-Received: from localhost ([127.0.0.1]:52943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVOZO-000086-A2 for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jul 2009 07:40:42 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e11g2000yqo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: 84.59.201.225 Original-X-Trace: posting.google.com 1248691830 20852 127.0.0.1 (27 Jul 2009 10:50:30 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 27 Jul 2009 10:50:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e11g2000yqo.googlegroups.com; posting-host=84.59.201.225; posting-account=Cb0eCQoAAADOp8Qt5mU0s83Gs6qJzY70 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.9 (Debian-3.0.9-1),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:171240 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66426 Archived-At: On Jul 27, 11:50=A0am, Daniel Kraft wrote: [...] > I'm happy that lexical-let works well to build closures (and in fact it > seems that this is the main intention for lexical-let at all); however > this code does not work as expected: > > (setq a 1) > (lexical-let ((a 2)) > =A0 =A0((lambda () (print a)))) > =A0 =A0=3D> 1 > I don't know, but this prints `2' in my emacs (GNU Emacs 22.3.1). -ap > I don't know why, but it seems that calling a closure directly fails, > while storing it and calling it later succeeds (as in the examples athttp= ://www.delorie.com/gnu/docs/emacs/cl_21.htmlfor instance). =A0Is this > a bug or again something expected? =A0If the latter, what's the exact > rationale and semantics then? > > Thank you very much for your help! > Daniel