diff options
author | Neil Jerram <neil@ossau.uklinux.net> | 2008-01-29 23:02:18 +0000 |
---|---|---|
committer | Neil Jerram <neil@ossau.uklinux.net> | 2008-01-29 23:02:18 +0000 |
commit | 6a945c34cfc7e44dfadea85b08e0a8bbd4dbc0e8 (patch) | |
tree | 76c9b796613b930254c8a81f0e67e703a14d44c4 /guile-readline | |
parent | 5e42b8e7546d599653f00be07ce1f2c29233aa2f (diff) |
* readline.c (scm_init_readline): Only do init_bouncing_parens ()
if HAVE_RL_GET_KEYMAP.
(init_bouncing_parens, find_matching_paren, match_paren): Compile
out if ! HAVE_RL_GET_KEYMAP.
* configure.in: Add check for rl_get_keymap.
Diffstat (limited to 'guile-readline')
-rw-r--r-- | guile-readline/ChangeLog | 9 | ||||
-rw-r--r-- | guile-readline/configure.in | 5 | ||||
-rw-r--r-- | guile-readline/readline.c | 4 |
3 files changed, 18 insertions, 0 deletions
diff --git a/guile-readline/ChangeLog b/guile-readline/ChangeLog index a599a6699..97d298281 100644 --- a/guile-readline/ChangeLog +++ b/guile-readline/ChangeLog @@ -1,3 +1,12 @@ +2008-01-29 Neil Jerram <neil@ossau.uklinux.net> + + * readline.c (scm_init_readline): Only do init_bouncing_parens () + if HAVE_RL_GET_KEYMAP. + (init_bouncing_parens, find_matching_paren, match_paren): Compile + out if ! HAVE_RL_GET_KEYMAP. + + * configure.in: Add check for rl_get_keymap. + 2007-07-29 Ludovic Courtès <ludo@gnu.org> * Makefile.am (INCLUDES): Add Gnulib includes. diff --git a/guile-readline/configure.in b/guile-readline/configure.in index b58b46b87..d0fda02a1 100644 --- a/guile-readline/configure.in +++ b/guile-readline/configure.in @@ -43,6 +43,11 @@ AC_CHECK_FUNCS(siginterrupt rl_clear_signals rl_cleanup_after_signal) dnl Check for modern readline naming AC_CHECK_FUNCS(rl_filename_completion_function) +dnl Check for rl_get_keymap. We only use this for deciding whether to +dnl install paren matching on the Guile command line (when using +dnl readline for input), so it's completely optional. +AC_CHECK_FUNCS(rl_get_keymap) + dnl Check for rl_pre_input_hook. This is more complicated because on dnl some systems (HP/UX), the linker wont let us treat dnl rl_pre_input_hook as a function when it really is a function diff --git a/guile-readline/readline.c b/guile-readline/readline.c index 5a8ced64a..aa14e3967 100644 --- a/guile-readline/readline.c +++ b/guile-readline/readline.c @@ -425,6 +425,7 @@ completion_function (char *text, int continuep) } } +#if HAVE_RL_GET_KEYMAP /*Bouncing parenthesis (reimplemented by GH, 11/23/98, since readline is strict gpl)*/ static int match_paren (int x, int k); @@ -528,6 +529,7 @@ match_paren (int x, int k) } return 0; } +#endif /* HAVE_RL_GET_KEYMAP */ #if defined (HAVE_RL_PRE_INPUT_HOOK) && defined (GUILE_SIGWINCH_SA_RESTART_CLEARED) /* Readline disables SA_RESTART on SIGWINCH. @@ -575,7 +577,9 @@ scm_init_readline () reentry_barrier_mutex = scm_permanent_object (scm_make_mutex ()); scm_init_opts (scm_readline_options, scm_readline_opts); +#if HAVE_RL_GET_KEYMAP init_bouncing_parens(); +#endif scm_add_feature ("readline"); #endif /* HAVE_RL_GETC_FUNCTION */ } |