[Top][All Lists]

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

Guile on Zile, module questions

From: Mike Gran
Subject: Guile on Zile, module questions
Date: Wed, 30 Nov 2011 14:09:30 -0800 (PST)

Hello Guilers!
Over the USA holiday I started looking at the last C version of
Zile, which has its own toy Lisp interpreter.  (Zile also
comes in a new Lua version!)  I looks like it would be simple to
strip out that Zile Lisp and replace it with Guile Scheme. 
But I don't think anyone has tried it.
This notion is not new: Ludo and Reuben chatted about it once.
But Zile wants to be tiny, portable and doesn't need to be
extensible.  Guile is not tiny, and for the moment, not very 
I thought it might be a fun hack, strictly for my own amusement.
And I thought that it could actually be completed by one guy:
unlike Guile in EMACS.  That codebase is k-krazy big.
I got pretty far along until I ran into my first real
problem having to do with extracting a list of all the
top-level variables so I can to tab completion.
Zile has two scopes.
1) a Zile scope
2) a buffer-specific scope
In Guile terms, the Zile module is imported into and shadowed by
the buffer-specific module.
In EMACS, you'd use 'setq' for new Zile-scope vars, and
'make-local-variable' for buffer-specific. (A simplification, but
close enough)
Anyway, I need to extract all the procedure or variable names
for use with the tab-key autocompletion function.  I don't
want autocomplete to give all accessible Guile vars/funcs,
only editor-specific vars/funcs.
So, I went source diving so I could figure out how to extract
a list of
1) the public, exported bindings in the Zile module, and
2) the top-level bindings in the buffer-specific module
As far as I can tell, I should use 'module-obarray' to get
all the bindings for the buffer-specific module and I should
look at '%module-public-interface' to get the list of exported
functions and vars in the top Zile module.
Is that right?
Mike Gran

reply via email to

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