aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King2014-02-19 23:45:19 -0500
committerStefan Monnier2014-02-19 23:45:19 -0500
commiteee0d650346cc3182f08a88940f0e06325721c70 (patch)
tree2ef86bfb03b51a3eda8415d75fbe0e7f023b6251
parent94e5e202d952ac74c6540ed41b1bac957855c5fa (diff)
downloademacs-eee0d650346cc3182f08a88940f0e06325721c70.tar.gz
emacs-eee0d650346cc3182f08a88940f0e06325721c70.zip
* lisp/term/xterm.el (xterm--version-handler): Adapt to xterm-280's output.
Fixes: debbugs:16657
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/term/xterm.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 94a194bbd99..833c089f107 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-02-20 W. Trevor King <wking@tremily.us> (tiny change)
2
3 * term/xterm.el (xterm--version-handler): Adapt to xterm-280's output
4 (bug#16657).
5
12014-02-19 Juanma Barranquero <lekktu@gmail.com> 62014-02-19 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * frameset.el (frameset-restore): Delay removing an old frame's 8 * frameset.el (frameset-restore): Delay removing an old frame's
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 87f8c966deb..eac40141979 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -500,8 +500,9 @@ The relevant features are:
500 ;; see if by using a longer timeout we get rid of most issues. 500 ;; see if by using a longer timeout we get rid of most issues.
501 (while (and (setq chr (read-event nil nil 2)) (not (equal chr ?c))) 501 (while (and (setq chr (read-event nil nil 2)) (not (equal chr ?c)))
502 (setq str (concat str (string chr)))) 502 (setq str (concat str (string chr))))
503 (when (string-match "0;\\([0-9]+\\);0" str) 503 ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
504 (let ((version (string-to-number (match-string 1 str)))) 504 (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str)
505 (let ((version (string-to-number (match-string 2 str))))
505 ;; If version is 242 or higher, assume the xterm supports 506 ;; If version is 242 or higher, assume the xterm supports
506 ;; reporting the background color (TODO: maybe earlier 507 ;; reporting the background color (TODO: maybe earlier
507 ;; versions do too...) 508 ;; versions do too...)