mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
readline: Avoid interpreting control characters in pastes.
* NEWS: Update. * doc/ref/repl-modules.texi (Readline Options): Update for bracketed-paste. * guile-readline/readline.h (SCM_READLINE_BRACKETED_PASTE): Add bracketed-paste option. * guile-readline/readline.c (scm_readline_opts): Add bracketed-paste. (scm_init_readline): Wire up the logic.
This commit is contained in:
parent
7ac3d17cea
commit
96c9af4ab1
4 changed files with 27 additions and 2 deletions
|
@ -47,6 +47,8 @@ scm_t_option scm_readline_opts[] = {
|
|||
"History length." },
|
||||
{ SCM_OPTION_INTEGER, "bounce-parens", 500,
|
||||
"Time (ms) to show matching opening parenthesis (0 = off)."},
|
||||
{ SCM_OPTION_BOOLEAN, "bracketed-paste", 1,
|
||||
"Disable interpretation of control characters in pastes." },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -545,7 +547,10 @@ scm_init_readline ()
|
|||
|
||||
reentry_barrier_mutex = scm_make_mutex ();
|
||||
scm_init_opts (scm_readline_options,
|
||||
scm_readline_opts);
|
||||
scm_readline_opts);
|
||||
rl_variable_bind ("enable-bracketed-paste",
|
||||
SCM_READLINE_BRACKETED_PASTE ? "on" : "off");
|
||||
|
||||
#if HAVE_RL_GET_KEYMAP
|
||||
init_bouncing_parens();
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,8 @@ SCM_RL_API scm_t_option scm_readline_opts[];
|
|||
#define SCM_HISTORY_FILE_P scm_readline_opts[0].val
|
||||
#define SCM_HISTORY_LENGTH scm_readline_opts[1].val
|
||||
#define SCM_READLINE_BOUNCE_PARENS scm_readline_opts[2].val
|
||||
#define SCM_N_READLINE_OPTIONS 3
|
||||
#define SCM_READLINE_BRACKETED_PASTE scm_readline_opts[3].val
|
||||
#define SCM_N_READLINE_OPTIONS 4
|
||||
|
||||
SCM_RL_API SCM scm_readline_options (SCM setting);
|
||||
SCM_RL_API void scm_readline_init_ports (SCM inp, SCM outp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue