aboutsummaryrefslogtreecommitdiff
path: root/readline/parens.c
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2015-07-25 15:41:05 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2015-07-25 15:57:00 -0400
commit5836a818eccb180d75c92ce4c861abb6fe8dec23 (patch)
tree624044ca5df5a6c192e47933a735ab4fe9aaea71 /readline/parens.c
parentb8cc7b2e9afab37eb9a7cff0d3ae4ebbcf7d494f (diff)
downloadgdb-5836a818eccb180d75c92ce4c861abb6fe8dec23.zip
gdb-5836a818eccb180d75c92ce4c861abb6fe8dec23.tar.gz
gdb-5836a818eccb180d75c92ce4c861abb6fe8dec23.tar.bz2
Revert "Sync readline/ to version 7.0 alpha"
This reverts commit b558ff043d41ba8d17a82f5f9ae5f9dade66160e. This reverts commit 4a11f2065906976675808364ddbd1c0f77eea41f. The initial import commit failed to retain local changes made to readline's configure.in (and the commit message erroneously stated that there were no local changes that needed to be reapplied). Also the import caused a couple of build errors and a scattering of testsuite regressions throughout many arches. It's probably better to start over with this import, hopefully more carefully next time.
Diffstat (limited to 'readline/parens.c')
-rw-r--r--readline/parens.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/readline/parens.c b/readline/parens.c
index d77297e..9c98488 100644
--- a/readline/parens.c
+++ b/readline/parens.c
@@ -57,7 +57,11 @@ static int find_matching_open PARAMS((char *, int, int));
/* Non-zero means try to blink the matching open parenthesis when the
close parenthesis is inserted. */
+#if defined (HAVE_SELECT)
+int rl_blink_matching_paren = 1;
+#else /* !HAVE_SELECT */
int rl_blink_matching_paren = 0;
+#endif /* !HAVE_SELECT */
static int _paren_blink_usec = 500000;
@@ -68,32 +72,16 @@ _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
}
}
@@ -129,7 +117,7 @@ rl_insert_close (count, invoking_key)
/* Emacs might message or ring the bell here, but I don't. */
if (match_point < 0)
- return 1;
+ return -1;
FD_ZERO (&readfds);
FD_SET (fileno (rl_instream), &readfds);