aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-04-22 16:35:33 -0400
committerStefan Monnier2014-04-22 16:35:33 -0400
commitf7e0450a3707d408ac32e4694e4c87ec37d4d204 (patch)
tree8d665347c7720bc4e52bb06a72cfff1b854804e4
parent34e856d5ac828753b7be20e2471f39fb613f7f40 (diff)
downloademacs-f7e0450a3707d408ac32e4694e4c87ec37d4d204.tar.gz
emacs-f7e0450a3707d408ac32e4694e4c87ec37d4d204.zip
* lisp/term/xterm.el (xterm--version-handler): Don't use modern xterm
features on gnome-terminal. Fixes: debbugs:16988
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/term/xterm.el6
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 679c9ab51d7..b76d3c4a194 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-04-22 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * term/xterm.el (xterm--version-handler): Don't use modern xterm
4 features on gnome-terminal (bug#16988).
5
12014-04-22 Michael Heerdegen <michael_heerdegen@web.de> 62014-04-22 Michael Heerdegen <michael_heerdegen@web.de>
2 7
3 * dired.el (dired-insert-set-properties): Do not consider 8 * dired.el (dired-insert-set-properties): Do not consider
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index eac40141979..52487f3bded 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -503,6 +503,12 @@ The relevant features are:
503 ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0. 503 ;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
504 (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str) 504 (when (string-match "\\([0-9]+\\);\\([0-9]+\\);0" str)
505 (let ((version (string-to-number (match-string 2 str)))) 505 (let ((version (string-to-number (match-string 2 str))))
506 (when (and (> version 2000) (equal (match-string 1 str) "1"))
507 ;; Hack attack! bug#16988: gnome-terminal reports "1;NNNN;0"
508 ;; with a large NNNN but is based on a rather old xterm code.
509 ;; Gnome terminal 3.6.1 reports 1;3406;0
510 ;; Gnome terminal 2.32.1 reports 1;2802;0
511 (setq version 200))
506 ;; If version is 242 or higher, assume the xterm supports 512 ;; If version is 242 or higher, assume the xterm supports
507 ;; reporting the background color (TODO: maybe earlier 513 ;; reporting the background color (TODO: maybe earlier
508 ;; versions do too...) 514 ;; versions do too...)