This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: tie variable



> I don't see why this is required.  Are you thinking that we should try
> to coerce Guile into evaluating elisp code verbatim?

No.  But it seems inevitable to me that an Emacs lisp 'let' must
change the binding of a global variable to a thread-local value.

> I thought we were going to translate the code, and then it should be
> possible to translate a variable reference into an arbitrary
> expression, e.g. into a byte-code object (similar to a gloc) which
> references a fluid.

No, this isn't correct.  Any global variable in Emacs Lisp can be
re-bound by a let, so unless you want to represent every Emacs Lisp
global with a fluid, this won't work.

> > To reduce the overhead, we could make the `unbound' value, which the
> > interpreter already checks for, one of these objects, whose reference
> > and assignment functions signal an `unbound variable' error.
> > 
> > Does the interpreter check for unbound values in local variables?
> 
> No, it does this only the first time the variable is referenced.

Actually, it's not necessary to change the way local variables work,
only global variables.  There are no "local" variables in Emacs Lisp
--- just global variables which have are temporarily rebound.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]