+2006-07-23 Kazu Hirata <kazu@codesourcery.com>
+
+ readline/
+ Backport from mainline:
+ * emacs_keymap.c: Add a MINGW32 hack.
+ * readline.c: Use _rl_bind_if_unbound to avoid macro bugs.
+
2006-07-18 Nathan Sidwell <nathan@codesourcery.com>
gdb/
{ ISFUNC, rl_insert }, /* Latin capital letter Y with acute */
{ ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */
{ ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */
+#ifndef __MINGW32__
{ ISFUNC, rl_insert }, /* Latin small letter a with grave */
+#else
+ { ISFUNC, 0 }, /* Must leave this unbound for the arrow keys to work. */
+#endif
{ ISFUNC, rl_insert }, /* Latin small letter a with acute */
{ ISFUNC, rl_insert }, /* Latin small letter a with circumflex */
{ ISFUNC, rl_insert }, /* Latin small letter a with tilde */
#endif
#ifdef __MINGW32__
- /* Under Windows, when an extend key (like an arrow key) is
- pressed, getch() will return 340 (octal) followed by a code for
- the extended key. We use macros to transform those into the
- normal ANSI terminal sequences for these keys. */
-
- /* Up arrow. */
- rl_macro_bind ("\340H", "\033[A", map);
- /* Left arrow. */
- rl_macro_bind ("\340K", "\033[D", map);
- /* Right arrow. */
- rl_macro_bind ("\340M", "\033[C", map);
- /* Down arrow. */
- rl_macro_bind ("\340P", "\033[B", map);
+ _rl_bind_if_unbound ("\340H", rl_get_previous_history);
+ _rl_bind_if_unbound ("\340P", rl_get_next_history);
+ _rl_bind_if_unbound ("\340M", rl_forward_char);
+ _rl_bind_if_unbound ("\340K", rl_backward_char);
#endif
_rl_bind_if_unbound ("\033[A", rl_get_previous_history);