diff options
author | Dan Nicolaescu <[email protected]> | 2007-10-23 14:24:43 +0000 |
---|---|---|
committer | Dan Nicolaescu <[email protected]> | 2007-10-23 14:24:43 +0000 |
commit | 657e833239de855e2153380bab1066586d023ae6 (patch) | |
tree | 362161414a6fd3c16d6c716947b57a42bd0a3a17 | |
parent | 5eceba819dfe8df19af47ac58f9a1c5a9bc43ad2 (diff) |
(terminal-init-xterm): Experiment with a longer
timeout.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/term/xterm.el | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 406d29a2cc..3364e892a4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-10-23 Dan Nicolaescu <[email protected]> + + * term/xterm.el (terminal-init-xterm): Experiment with a longer + timeout. + 2007-10-23 Katsumi Yamaoka <[email protected]> * emacs-lisp/advice.el (ad-make-advised-docstring): diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index a60aa90255..fbc4c861bf 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -480,9 +480,14 @@ (send-string-to-terminal "\e[>0c") ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c - (when (equal (read-event nil nil 0.1) ?\e) - (when (equal (read-event nil nil 0.1) ?\[) - (while (not (equal (setq chr (read-event nil nil 0.1)) ?c)) + ;; If the timeout is completely removed for read-event, this + ;; might hang for terminals that pretend to be xterm, but don't + ;; respond to this escape sequence. RMS' opinion was to remove + ;; it completely. That might be right, but let's first try to + ;; see if by using a longer timeout we get rid of most issues. + (when (equal (read-event nil nil 2) ?\e) + (when (equal (read-event nil nil 2) ?\[) + (while (not (equal (setq chr (read-event nil nil 2)) ?c)) (setq str (concat str (string chr)))) (when (string-match ">0;\\([0-9]+\\);0" str) ;; NUMBER2 is the xterm version number, look for something |