unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile on Zile, module questions
@ 2011-11-30 22:09 Mike Gran
       [not found] ` <1322690970.58961.YahooMailNeo-K7NgfNXsWCyvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
  2011-12-05 17:11 ` Ludovic Courtès
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Gran @ 2011-11-30 22:09 UTC (permalink / raw)
  To: Guile User; +Cc: help-zile@gnu.org

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 
portable.  
 
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?
 
Thanks,
 
Mike Gran



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-01-04 19:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 22:09 Guile on Zile, module questions Mike Gran
     [not found] ` <1322690970.58961.YahooMailNeo-K7NgfNXsWCyvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2011-12-03  9:04   ` Reuben Thomas
2011-12-05 17:11 ` Ludovic Courtès
     [not found]   ` <87obvnhrja.fsf-mXXj517/zsQ@public.gmane.org>
2011-12-28  4:57     ` Mike Gran
2012-01-01 21:07       ` [Help-zile] " Reuben Thomas
2012-01-03 22:58       ` Ludovic Courtès
2012-01-04 19:01         ` Guile on Zile Mike Gran
2011-12-28  4:59   ` Guile on Zile, module questions Mike Gran
2011-12-28 11:06     ` Klaus Schilling
2011-12-28 16:27       ` Guile on Zile Mike Gran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).