[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lexical-let detail semantics
From: |
A.Politz |
Subject: |
Re: lexical-let detail semantics |
Date: |
Mon, 27 Jul 2009 03:50:30 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Jul 27, 11:50 am, Daniel Kraft <d...@domob.eu> 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))
> ((lambda () (print a))))
> => 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). Is this
> a bug or again something expected? If the latter, what's the exact
> rationale and semantics then?
>
> Thank you very much for your help!
> Daniel