[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't get outside bindings in the string expression with eval-string
From: |
Andy Wingo |
Subject: |
Re: Can't get outside bindings in the string expression with eval-string |
Date: |
Tue, 18 Oct 2011 16:59:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
On Tue 18 Oct 2011 16:32, Nala Ginrut <address@hidden> writes:
> -----------------------wrong code------------------------------
> (define (func)
> (let ((fp (open-output-file "/tmp/aaa")))
> (eval-string "(write 123 fp)" (current-module))
> ))
> -----------------------end code------------------------------------
`fp' is a lexical binding, not a module-level binding. So no, this
won't work. You won't be able to get to lexical variables via `eval'
(or `eval-string').
Andy
--
http://wingolog.org/