all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Philipp Stephani <p.stephani2@gmail.com>, emacs-devel@gnu.org
Subject: Re: Trouble with lexical-binding.
Date: Wed, 15 Apr 2015 13:44:09 +0000	[thread overview]
Message-ID: <20150415134409.GA3351@acm.fritz.box> (raw)
In-Reply-To: <jwvoamqlkin.fsf-monnier+emacs@gnu.org>

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).



  reply	other threads:[~2015-04-15 13:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 22:03 Trouble with lexical-binding Alan Mackenzie
2015-04-13 22:19 ` Philipp Stephani
2015-04-14 14:03   ` Alan Mackenzie
2015-04-14 16:53     ` Stefan Monnier
2015-04-15 13:44       ` Alan Mackenzie [this message]
2015-04-15 14:34         ` Stefan Monnier
2015-04-13 22:28 ` Stefan Monnier
2015-04-15 13:48   ` Nicolas Richard
2015-04-15 14:44     ` Stefan Monnier
2015-04-16 17:34       ` Nicolas Richard
2015-04-16 18:43         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150415134409.GA3351@acm.fritz.box \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.