Hello again, > > Why not use a registration > > API instead? In other words, instead of this: > > > > (define (do-plugin-thing-1 ...) ...) > > (define (do-plugin-thing-2 ...) ...) > > ... > > > > do this: > > > > (let () > > (define (do-plugin-thing-1 ...) ...) > > (define (do-plugin-thing-2 ...) ...) > > ... > > (register-plugin do-plugin-thing-1 > > do-plugin-thing-2 > > ...))
This is the code of the plugin right? and register-plugin is a function provided by me for the plugins to call? But i'll still need an entry point inside the plugin: a procedure that i'll call from the module as soon as i load it. So this approach doesn't seem to be of a big advantage. > > This way there is no magic, and the visibility of the plugin bindings is > > under the control of the plugin author. I think I have figured-out a way out of this visibility problem: (define amodule (resolve-module '(amodule))) ((variable-ref (module-local-variable amodule 'xchat-plugin-init))) This code seems to work and there is no need for the plugin to export it's objects anymore. > Also, this way you could stay > > pure-R5RS if you like, as you don't really need any features of the > > module system. Wait a sec? Are you really thinking what i think you are thinking: use the simple 'load' procedure combined with your suggested registeration API instead of using the module system of guile? Regards, Zeeshan Ali _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user