This is the mail archive of the guile@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] |
(nobody) writes:
> It's likely that I'm missing something, but it's turning out to be
> tricky to add readline support back into a guile program. It's not
> just a matter of calling scm_init_readline. The problem is that
> boot-9 defines the top-repl before any user init functions are called
> and it checks to see if readline is available.
>
> This leads me to some problems I've had to fight with guile's
> initialization:
>
> -- User initialization functions can only be called after boot-9
> has been loaded. This makes it impossible to initialize a
> readline feature from a user library without also overriding
> boot-9's (top-repl). I get around it by copying the relavent
> sections of boot-9.scm to my-boot-9.scm and loading it in
> my_init_readline, but it seems clumsy.
>
> -- Using guile's exported interface it's not possible for an
> application to substitute it's own init scripts in place of or
> in addition to .guile. I manage to force a boot script after
> boot-9 by munging argv, but that's an iffy solution.
>
> Hopefully I'm doing something wrong and there are easier solutions.
Well, maybe boot-9 should set up code to run in the future using
lambdas plus a hook variable. When (top-repl) actually *runs* it can
run the hook. In between, you can put your user initializations.
This requires a reorganization of boot-9, of course.
-russ
--
Anyone who challenges the prevailing orthodoxy finds himself silenced
with surprising effectiveness. A genuinely unfashionable opinion is
almost never given a fair hearing.
-- George Orwell