[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in eval-string?
From: |
Marius Vollmer |
Subject: |
Re: Bug in eval-string? |
Date: |
08 Aug 2002 23:03:56 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
address@hidden writes:
> (let ((interaction-environment (lambda () boxx)))
> (format #t "Meaning of life in a box is: ~A\n"
> (eval-string "meaning-of-life")))
Scheme 'let' creates new lexical variables, it doesn't dynamically
bind existing variables like Elisp 'let' would. Your
interaction-environment is a separate variable from the
interaction-environment variable used by eval-string.
To dynamically bind the current module (which is the same as the
interaction-environment), use save-module-excursion together with
set-current-module.
(save-module-excursion
(lambda ()
(set-current-module boxx)
(format ...)))
Yes, this could be prettier. What about adding "with" as a general
dynamic scoping construct?
(with ((current-module) boxx)
...)
- Bug in eval-string?, rm, 2002/08/08
- Re: Bug in eval-string?,
Marius Vollmer <=
- Re: Bug in eval-string?, Matthias Koeppe, 2002/08/09
- Re: Bug in eval-string?, Marius Vollmer, 2002/08/09
- Re: Bug in eval-string?, Matthias Koeppe, 2002/08/09
- Re: Bug in eval-string?, Marius Vollmer, 2002/08/10
- Re: Bug in eval-string?, Matthias Koeppe, 2002/08/12
- Re: Bug in eval-string?, Marius Vollmer, 2002/08/12
- Re: Bug in eval-string?, Marius Vollmer, 2002/08/14
- Re: Bug in eval-string?, Neil Jerram, 2002/08/19
- Re: Bug in eval-string?, Matthias Koeppe, 2002/08/20
- Re: Bug in eval-string?, Marius Vollmer, 2002/08/21