diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-12-06 03:57:16 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-12-06 03:57:16 +0000 |
commit | 56f37e53c9713f1ff3823bfd649cf2c9827d6068 (patch) | |
tree | 51a0f583619b1e89b0d355b2f678a4e1e88b32b1 /lisp/term/xterm.el | |
parent | 91b07ee352424d5aa470310eedce3840071e3589 (diff) | |
download | emacs-56f37e53c9713f1ff3823bfd649cf2c9827d6068.tar.gz |
(terminal-init-xterm): Discard pending input before reading a reply to
the terminal attributes query.
Diffstat (limited to 'lisp/term/xterm.el')
-rw-r--r-- | lisp/term/xterm.el | 3 |
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 @@ (let ((coding-system-for-read 'binary) (chr nil) (str nil)) + ;; Pending input can be mistakenly returned by the calls to + ;; read-event below. Discard it. + (discard-input) ;; Try to find out the type of terminal by sending a "Secondary ;; Device Attributes (DA)" query. (send-string-to-terminal "\e[>0c") |