From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Trouble with lexical-binding. Date: Wed, 15 Apr 2015 13:44:09 +0000 Message-ID: <20150415134409.GA3351@acm.fritz.box> References: <20150413220317.GC6324@acm.fritz.box> <20150414140313.GA4612@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1429105479 22649 80.91.229.3 (15 Apr 2015 13:44:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2015 13:44:39 +0000 (UTC) Cc: Philipp Stephani , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 15 15:44:21 2015 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 1YiNc5-00082k-Ay for ged-emacs-devel@m.gmane.org; Wed, 15 Apr 2015 15:44:21 +0200 Original-Received: from localhost ([::1]:60626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNc4-0004VM-AG for ged-emacs-devel@m.gmane.org; Wed, 15 Apr 2015 09:44:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNc1-0004VG-9E for emacs-devel@gnu.org; Wed, 15 Apr 2015 09:44:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiNby-0001vH-2k for emacs-devel@gnu.org; Wed, 15 Apr 2015 09:44:17 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:15414 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiNbx-0001v2-PL for emacs-devel@gnu.org; Wed, 15 Apr 2015 09:44:13 -0400 Original-Received: (qmail 87144 invoked by uid 3782); 15 Apr 2015 13:44:10 -0000 Original-Received: from acm.muc.de (p579E8AD7.dip0.t-ipconnect.de [87.158.138.215]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 15 Apr 2015 15:44:08 +0200 Original-Received: (qmail 23203 invoked by uid 1000); 15 Apr 2015 13:44:09 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.1 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:185448 Archived-At: Hello, Stefan. On Tue, Apr 14, 2015 at 12:53:14PM -0400, Stefan Monnier wrote: > > Thanks, this (almost) works. In the end, in my actual code, I needed to > > put a backquote on (lambda ...), so as to be able to evaluate something > > inside it with a comma. There's always a way. > Then it's not a closure any more, and you might be back with the same problem. You're right: it's not a closure any more. That seems to be an uncomfortable inconsistency with lambda: whether or not it generates a lambda or a closure depends on when and how it's evaluated. Somehow, my code runs OK. It seems the stack frame in which the lambda is generated is also the one from which the funcall is invoked. Or something like that. I hope you'll forgive me pointing out that the doc string and section in the elisp manual haven't been updated to describe these complications. > Stefan -- Alan Mackenzie (Nuremberg, Germany).