aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-12-06 03:57:16 +0000
committerChong Yidong2008-12-06 03:57:16 +0000
commit56f37e53c9713f1ff3823bfd649cf2c9827d6068 (patch)
tree51a0f583619b1e89b0d355b2f678a4e1e88b32b1
parent91b07ee352424d5aa470310eedce3840071e3589 (diff)
downloademacs-56f37e53c9713f1ff3823bfd649cf2c9827d6068.tar.gz
emacs-56f37e53c9713f1ff3823bfd649cf2c9827d6068.zip
(terminal-init-xterm): Discard pending input before reading a reply to
the terminal attributes query.
-rw-r--r--lisp/term/xterm.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index b01adf4995b..e893f88da50 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -473,6 +473,9 @@
473 (let ((coding-system-for-read 'binary) 473 (let ((coding-system-for-read 'binary)
474 (chr nil) 474 (chr nil)
475 (str nil)) 475 (str nil))
476 ;; Pending input can be mistakenly returned by the calls to
477 ;; read-event below. Discard it.
478 (discard-input)
476 ;; Try to find out the type of terminal by sending a "Secondary 479 ;; Try to find out the type of terminal by sending a "Secondary
477 ;; Device Attributes (DA)" query. 480 ;; Device Attributes (DA)" query.
478 (send-string-to-terminal "\e[>0c") 481 (send-string-to-terminal "\e[>0c")