commit bash-20150626 snapshot

This commit is contained in:
Chet Ramey
2015-07-09 11:18:25 -04:00
parent 05d9462c4b
commit b47ecd026d
13 changed files with 106 additions and 1039 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ static int rl_gather_tyi PARAMS((void));
int
win32_isatty (int fd)
{
return (_isatty (fd) ? ((((long) (HANDLE) _get_osfhandle (fd)) & 3) == 3) ? 0);
return (_isatty (fd) ? ((((long) (HANDLE) _get_osfhandle (fd)) & 3) == 3) : 0);
}
#define isatty(x) win32_isatty(x)
+18 -2
View File
@@ -68,16 +68,32 @@ _rl_enable_paren_matching (on_or_off)
int on_or_off;
{
if (on_or_off)
{ /* ([{ */
{
/* ([{ */
rl_bind_key_in_map (')', rl_insert_close, emacs_standard_keymap);
rl_bind_key_in_map (']', rl_insert_close, emacs_standard_keymap);
rl_bind_key_in_map ('}', rl_insert_close, emacs_standard_keymap);
#if defined (VI_MODE)
/* ([{ */
rl_bind_key_in_map (')', rl_insert_close, vi_insertion_keymap);
rl_bind_key_in_map (']', rl_insert_close, vi_insertion_keymap);
rl_bind_key_in_map ('}', rl_insert_close, vi_insertion_keymap);
#endif
}
else
{ /* ([{ */
{
/* ([{ */
rl_bind_key_in_map (')', rl_insert, emacs_standard_keymap);
rl_bind_key_in_map (']', rl_insert, emacs_standard_keymap);
rl_bind_key_in_map ('}', rl_insert, emacs_standard_keymap);
#if defined (VI_MODE)
/* ([{ */
rl_bind_key_in_map (')', rl_insert, vi_insertion_keymap);
rl_bind_key_in_map (']', rl_insert, vi_insertion_keymap);
rl_bind_key_in_map ('}', rl_insert, vi_insertion_keymap);
#endif
}
}
+7 -4
View File
@@ -1023,11 +1023,13 @@ _rl_subseq_result (r, map, key, got_subseq)
func = m[ANYOTHERKEY].function;
if (type == ISFUNC && func == rl_do_lowercase_version)
r = _rl_dispatch (_rl_to_lower (key), map);
else if (type == ISFUNC && func == rl_insert)
else if (type == ISFUNC)
{
/* If the function that was shadowed was self-insert, we
somehow need a keymap with map[key].func == self-insert.
Let's use this one. */
/* If we shadowed a function, whatever it is, we somehow need a
keymap with map[key].func == shadowed-function.
Let's use this one. Then we can dispatch using the original
key, since there are commands (e.g., in vi mode) for which it
matters. */
nt = m[key].type;
nf = m[key].function;
@@ -1038,6 +1040,7 @@ _rl_subseq_result (r, map, key, got_subseq)
m[key].function = nf;
}
else
/* We probably shadowed a keymap, so keep going. */
r = _rl_dispatch (ANYOTHERKEY, m);
}
else if (r && map[ANYOTHERKEY].function)