From: Eli Zaretskii Date: Sat, 28 Sep 2013 09:03:48 +0000 (+0300) Subject: Fix up- and down-arrows in menus on Unix TTY (which now works). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1328^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cee18f1fb3c88fdc203e1108323df21f3bedcd15;p=emacs.git Fix up- and down-arrows in menus on Unix TTY (which now works). --- diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 70be2587b10..e37c6a28b4f 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2257,9 +2257,18 @@ If nil, the current mouse position is used." (defvar tty-menu-navigation-map (let ((map (make-sparse-keymap))) + ;; The next line is disabled because it breaks interpretation of + ;; escape sequences, produced by TTY arrow keys, as tty-menu-* + ;; commands. Instead, we explicitly bind some keys to + ;; tty-menu-exit. + ;;(define-key map [t] 'tty-menu-exit) + ;; The tty-menu-* are just symbols interpreted by term.c, they are ;; not real commands. - (define-key map [t] 'tty-menu-exit) + (substitute-key-definition 'keyboard-quit 'tty-menu-exit + map (current-global-map)) + (substitute-key-definition 'keyboard-escape-quit 'tty-menu-exit + map (current-global-map)) (substitute-key-definition 'forward-char 'tty-menu-next-menu map (current-global-map)) (substitute-key-definition 'backward-char 'tty-menu-prev-menu