aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-09-28 12:03:48 +0300
committerEli Zaretskii2013-09-28 12:03:48 +0300
commitcee18f1fb3c88fdc203e1108323df21f3bedcd15 (patch)
tree9e475cc078addaaa5d42ad33419601fcd121cc37
parentf42349881b1b37e1c84f18559c2a6b8236ecb6d2 (diff)
downloademacs-cee18f1fb3c88fdc203e1108323df21f3bedcd15.tar.gz
emacs-cee18f1fb3c88fdc203e1108323df21f3bedcd15.zip
Fix up- and down-arrows in menus on Unix TTY (which now works).
-rw-r--r--lisp/menu-bar.el11
1 files changed, 10 insertions, 1 deletions
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."
2257 2257
2258(defvar tty-menu-navigation-map 2258(defvar tty-menu-navigation-map
2259 (let ((map (make-sparse-keymap))) 2259 (let ((map (make-sparse-keymap)))
2260 ;; The next line is disabled because it breaks interpretation of
2261 ;; escape sequences, produced by TTY arrow keys, as tty-menu-*
2262 ;; commands. Instead, we explicitly bind some keys to
2263 ;; tty-menu-exit.
2264 ;;(define-key map [t] 'tty-menu-exit)
2265
2260 ;; The tty-menu-* are just symbols interpreted by term.c, they are 2266 ;; The tty-menu-* are just symbols interpreted by term.c, they are
2261 ;; not real commands. 2267 ;; not real commands.
2262 (define-key map [t] 'tty-menu-exit) 2268 (substitute-key-definition 'keyboard-quit 'tty-menu-exit
2269 map (current-global-map))
2270 (substitute-key-definition 'keyboard-escape-quit 'tty-menu-exit
2271 map (current-global-map))
2263 (substitute-key-definition 'forward-char 'tty-menu-next-menu 2272 (substitute-key-definition 'forward-char 'tty-menu-next-menu
2264 map (current-global-map)) 2273 map (current-global-map))
2265 (substitute-key-definition 'backward-char 'tty-menu-prev-menu 2274 (substitute-key-definition 'backward-char 'tty-menu-prev-menu