guile-devel
[Top][All Lists]
Advanced

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

Re: Value history


From: Marius Vollmer
Subject: Re: Value history
Date: 08 Aug 2002 19:46:19 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Greg Hewgill <address@hidden> writes:

> Below is a patch for the "Value history" idea. This diff is against
> the CVS head.

Excellent!  Thanks!

> If anybody has any suggestions for improvement, let me know. I get
> the feeling that the eval statement might not be the best way to do
> the global $<n> assignment, but it was the only way I could find to
> make it work.

Yes, eval is not the most direct way to do what you want.  You can
also use

    (module-define! (current-module) (string->symbol ...) result)

I think it is also important to have a way to switch the history off,
and to limit it to a maximum number of levels.  Otherwise, an
arbitrary amount of uncollectable garbage might built up without the
user being aware of it.

You can use

    (module-remove! (current-module)
      (module-local-variable (current-module) sym))

to undefine variables in the current module.  Might be worth to define
'module-undefine!'...

If you could make these changes, that would be great!



reply via email to

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