all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16656: [PATCH] Detect XTerm versions for non-VT100 emulation modes
@ 2014-02-05  9:05 W. Trevor King
  2014-02-05 16:47 ` bug#16657: " W. Trevor King
  0 siblings, 1 reply; 10+ messages in thread
From: W. Trevor King @ 2014-02-05  9:05 UTC (permalink / raw)
  To: 16656; +Cc: W. Trevor King

* term/xterm.el (xterm--version-handler): Handle cases where the
  terminal type is not zero.  The three numbers in the {CSI}>{Ps}c
  response are: Pp (terminal type), Pv (firmware version), and Pc
  (always zero for xterm).  Before this commit, Emacs only looked at
  Pv if Pp was zero (VT100).  However, for XTerm v280 and later, the
  default emulation is for VT420 (Pp = 41).  See the XTerm changelog
  for details:
  http://invisible-island.net/xterm/xterm.log-contents.html#xterm_280
---
 lisp/term/xterm.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 87f8c96..3d1b28b 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -500,8 +500,8 @@ 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))))
+    (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...)
-- 
1.8.5.2.8.g0f6c0d1






^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-02-20  4:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05  9:05 bug#16656: [PATCH] Detect XTerm versions for non-VT100 emulation modes W. Trevor King
2014-02-05 16:47 ` bug#16657: " W. Trevor King
2014-02-05 21:40   ` Glenn Morris
2014-02-06 16:24     ` W. Trevor King
2014-02-07  3:39       ` Glenn Morris
2014-02-07  5:20         ` W. Trevor King
2014-02-06 20:22     ` W. Trevor King
2014-02-19 19:17   ` W. Trevor King
2014-02-19 19:58     ` Stefan Monnier
2014-02-20  4:45   ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.