Hi Mike! Mike Gran <spk...@yahoo.com> skribis:
> 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 sounds great! Another competitor for Gano and Guile-Emacs! ;-) Where’s the source? :-) > Zile has two scopes. > 1) a Zile scope > 2) a buffer-specific scope You might want to check the crazy things BT Templeton did to handle that: http://www.gnu.org/ghm/2011/paris/slides/bt-templeton-guile-emacs.pdf (You might need additional input from him, though. ;-)) > 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. Note that you should use ‘module-public-interface’ instead of referring to the ‘%module-public-interface’ binding. Here’s an example: (hash-fold (lambda (k v r) (cons k r)) '() (module-obarray (module-public-interface the-root-module))) There’s also ‘module-for-each’: (module-for-each (lambda (b v) (format #t "variable `~a' has value `~a'~%" b (variable-ref v))) (resolve-interface '(ice-9 q))) Looking forward to using this new Zile. :-) Ludo’.