/* readline.c --- line editing support for Guile */
-/* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{ SCM_OPTION_INTEGER, "history-length", 200,
"History length." },
{ SCM_OPTION_INTEGER, "bounce-parens", 500,
- "Time (ms) to show matching opening parenthesis (0 = off)."}
+ "Time (ms) to show matching opening parenthesis (0 = off)."},
+ { 0 }
};
extern void stifle_history (int max);
{
SCM ans = scm_options (setting,
scm_readline_opts,
- SCM_N_READLINE_OPTIONS,
FUNC_NAME);
stifle_history (SCM_HISTORY_LENGTH);
return ans;
s = scm_to_locale_string (text);
add_history (s);
+ free (s);
return SCM_UNSPECIFIED;
}
}
}
+#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);
}
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.
reentry_barrier_mutex = scm_permanent_object (scm_make_mutex ());
scm_init_opts (scm_readline_options,
- scm_readline_opts,
- SCM_N_READLINE_OPTIONS);
+ scm_readline_opts);
+#if HAVE_RL_GET_KEYMAP
init_bouncing_parens();
+#endif
scm_add_feature ("readline");
#endif /* HAVE_RL_GETC_FUNCTION */
}