From eee0d650346cc3182f08a88940f0e06325721c70 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 Feb 2014 23:45:19 -0500 Subject: [PATCH] * lisp/term/xterm.el (xterm--version-handler): Adapt to xterm-280's output. Fixes: debbugs:16657 --- lisp/ChangeLog | 5 +++++ lisp/term/xterm.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94a194bbd9..833c089f10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-02-20 W. Trevor King (tiny change) + + * term/xterm.el (xterm--version-handler): Adapt to xterm-280's output + (bug#16657). + 2014-02-19 Juanma Barranquero * frameset.el (frameset-restore): Delay removing an old frame's diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 87f8c966de..eac4014197 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -500,8 +500,9 @@ The relevant features are: ;; see if by using a longer timeout we get rid of most issues. (while (and (setq chr (read-event nil nil 2)) (not (equal chr ?c))) (setq str (concat str (string chr)))) - (when (string-match "0;\\([0-9]+\\);0" str) - (let ((version (string-to-number (match-string 1 str)))) + ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0. + (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str) + (let ((version (string-to-number (match-string 2 str)))) ;; If version is 242 or higher, assume the xterm supports ;; reporting the background color (TODO: maybe earlier ;; versions do too...) -- 2.20.1