guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in eval-string?


From: Neil Jerram
Subject: Re: Bug in eval-string?
Date: 08 Aug 2002 22:27:59 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "rm" == rm  <address@hidden> writes:

    rm> Hello list,
    rm> according to the documentation, 'eval-string' 
    rm> evaluation "... takes place in the environment 
    rm> returned by the procedure interaction-environment".
    rm> Unfortunately this doesn't seem to work for me
    rm> (see the following test case):

    rm> (let ((interaction-environment (lambda () boxx)))
    rm>   (format #t "Meaning of life in a box is: ~A\n"
    rm>           (eval-string "meaning-of-life")))

This isn't Elisp!  The interaction-environment variable introduced by
your let has nothing to do with the builtin interaction-environment,
to which the documentation refers.

BTW, note that the builtin interaction-environment is (at least at the
moment) identical to current-module.

guile> (define boxx (make-module))
guile> (set-module-kind! boxx 'directory)
directory
guile> (module-define! boxx 'meaning-of-life 42)
#f
guile> (save-module-excursion
         (lambda ()
           (set-current-module boxx)
           (eval-string "meaning-of-life")))
42
guile> 

        Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]