This issue has been brought at least twice in R-help:

https://stat.ethz.ch/pipermail/r-help/2008-September/173828.html
https://stat.ethz.ch/pipermail/r-help/2009-May/197360.html

Looking at the source in src/unix/sys-std.c, it seems that the definition
of rl_readline_name as "RCustomCompletion" is made after the readline
library has been initialized and the ~/.inputrc file has been read.
Typing "C-x C-r" at the R prompt makes the definitions under "$if
RCustomCompletion" work, but this is not what one expects the R users to
do.

Attached below is the trivial patch that seems to fix the problem.

Best regards,

Rafael Laboissiere
Index: sys-std.c
===================================================================
--- sys-std.c	(revision 52687)
+++ sys-std.c	(working copy)
@@ -889,10 +889,10 @@
 	    rl_data.readline_eof = 0;
 	    rl_data.prev = rl_top;
 	    rl_top = &rl_data;
-	    pushReadline(prompt, readline_handler);
 #ifdef HAVE_RL_COMPLETION_MATCHES
 	    initialize_rlcompletion();
 #endif
+	    pushReadline(prompt, readline_handler);
 	}
 	else
 #endif /* HAVE_LIBREADLINE */
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to