Hi,
I'm implementing sending code in emacs factor buffers to the listener
for evaluation. When i'm sending just part of the buffer (say, a word
definition), i'm assuming that i need to tell the listener where to
evaluate the definition using IN:, and the list of USING: vocabs (as
pointed out by Slava in a previous mail). So my strategy is:
1) Recover from the listener its current vocab:
( initial-vocab ) in get .
storing it for later.
2) Provide the USING: form in the buffer
( initial-vocab ) USING: a b c ..;
3) Change to the buffer vocab with:
( initial-vocab ) IN: buffer-vocab
4) Evaluate the definition
( buffer-vocab ) : blah ( -- ) foo bar ;
5) Return to the vocab recovered in 1):
( buffer-vocab ) IN: initial-vocab
( initial-vocab )
Does that make any sense? Assuming it does, I was wondering if there's a
better way of doing the above. In particular:
- I've tried to find some form of push/pop vocab for 1) and 5) without
success.
- I've noticed that USING: keeps adding new elements to the 'use'
variable, which sounds like a bit of duplication if the user keeps
evaluating redefinitions with the same USING:... should that be a
concern?
Thanks for any hints,
jao
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk