This is the mail archive of the guile-emacs@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: automating %load-path


Keisuke Nishida <kxn30@po.cwru.edu> writes:

> What was wrong with the previous definition?  i.e.,
> (set-current-module the-root-module)

It assumed that the commands had been imported to the root
module.

Before my emacs/init.scm changes, .emacs.scm used to be loaded in
the root module.  When .emacs.scm used modules such as (emacs
guile), the public commands defined there were imported to the
root module and the Lisp side could find them.

Nowadays, .emacs.scm is loaded from emacs/init.scm so the root
module is not current.  If .emacs.scm uses (emacs guile), its
variables get imported to (emacs init).  The Lisp stubs defined
by `define-command' couldn't find them from there.

One could have worked around this problem by making
emacs/init.scm switch to the root module before loading
.emacs.scm.  But I think my solution is better, as it also takes
care of the case where .emacs.scm uses one module which uses
another module where commands are defined.

Now, `define-command' always makes the command available in Lisp,
whether or not anything uses the containing Scheme module.

> It worked fine.  Did the latest Guile change the behavior?

No, it was my fault.

I hope this won't break again when Guile gets its new module
system....

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]