On Tue, Jun 01 2010, Andy Wingo wrote:

> Hello list,
>
> It would be really great if someone could get to the bottom of our
> readline support and fix a couple things.
>
>  * Tab-completion: Works great for functions, not so much for arguments?
>
>    If at the repl you type `(string-' and press tab, you get a list of
>    symbols bound in the current module that start with string-. Of
>    course it would be nice to restrict these to procedures, but hey. But
>    if you type `(string-ref fo' and press TAB, you get nothing, not even
>    if `foo' is bound. Bummer, no? It's been this way for at least 10
>    years but I know that readline can do the right thing. Please fix?

I think the attached 1-character patch fixes argument completion.
Offering only callable symbols when completing on the first position is
something i hadn't thought of for geiser: i'm probably implementing it
there first and will try to backport the implementation to guile.

>
>  * History: Expression-oriented, please!
>
>    It would be great if going back in the history cycled through entire
>    expressions, not line-by-line. Again I know that readline can do
>    this. Please fix? :)

I'll try to find the time for that too. In the meantime, just use
geiser's REPL :)

Cheers,
jao
-- 
A lot of people have my books on their bookshelves.
That's the problem, they need to read them. -- Don Knuth

diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index 2d3617d..ed524da 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -554,7 +554,7 @@ scm_init_readline ()
 #else  
   rl_completion_entry_function = (Function*) completion_function;
 #endif
-  rl_basic_word_break_characters = "\t\n\"'`;()";
+  rl_basic_word_break_characters = " \t\n\"'`;()";
   rl_readline_name = "Guile";
 
   reentry_barrier_mutex = scm_make_mutex ();

Reply via email to