diff options
| author | Dan Nicolaescu | 2007-10-23 14:24:43 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2007-10-23 14:24:43 +0000 |
| commit | 657e833239de855e2153380bab1066586d023ae6 (patch) | |
| tree | 362161414a6fd3c16d6c716947b57a42bd0a3a17 | |
| parent | 5eceba819dfe8df19af47ac58f9a1c5a9bc43ad2 (diff) | |
| download | emacs-657e833239de855e2153380bab1066586d023ae6.tar.gz emacs-657e833239de855e2153380bab1066586d023ae6.zip | |
(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 406d29a2cc2..3364e892a40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-10-23 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * term/xterm.el (terminal-init-xterm): Experiment with a longer | ||
| 4 | timeout. | ||
| 5 | |||
| 1 | 2007-10-23 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2007-10-23 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/advice.el (ad-make-advised-docstring): | 8 | * emacs-lisp/advice.el (ad-make-advised-docstring): |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index a60aa90255f..fbc4c861bf9 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -480,9 +480,14 @@ | |||
| 480 | (send-string-to-terminal "\e[>0c") | 480 | (send-string-to-terminal "\e[>0c") |
| 481 | 481 | ||
| 482 | ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c | 482 | ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c |
| 483 | (when (equal (read-event nil nil 0.1) ?\e) | 483 | ;; If the timeout is completely removed for read-event, this |
| 484 | (when (equal (read-event nil nil 0.1) ?\[) | 484 | ;; might hang for terminals that pretend to be xterm, but don't |
| 485 | (while (not (equal (setq chr (read-event nil nil 0.1)) ?c)) | 485 | ;; respond to this escape sequence. RMS' opinion was to remove |
| 486 | ;; it completely. That might be right, but let's first try to | ||
| 487 | ;; see if by using a longer timeout we get rid of most issues. | ||
| 488 | (when (equal (read-event nil nil 2) ?\e) | ||
| 489 | (when (equal (read-event nil nil 2) ?\[) | ||
| 490 | (while (not (equal (setq chr (read-event nil nil 2)) ?c)) | ||
| 486 | (setq str (concat str (string chr)))) | 491 | (setq str (concat str (string chr)))) |
| 487 | (when (string-match ">0;\\([0-9]+\\);0" str) | 492 | (when (string-match ">0;\\([0-9]+\\);0" str) |
| 488 | ;; NUMBER2 is the xterm version number, look for something | 493 | ;; NUMBER2 is the xterm version number, look for something |