(when (and (> version 2000) (equal (match-string 1 str) "1"))
;; Hack attack! bug#16988: gnome-terminal reports "1;NNNN;0"
;; with a large NNNN but is based on a rather old xterm code.
- ;; Gnome terminal 3.6.1 reports 1;3406;0
;; Gnome terminal 2.32.1 reports 1;2802;0
+ ;; Gnome terminal 3.6.1 reports 1;3406;0
+ ;; Gnome terminal 3.22.2 reports 1;4601;0 and *does* support
+ ;; background color querying (Bug#29716).
+ (when (> version 4000)
+ (xterm--query "\e]11;?\e\\"
+ '(("\e]11;" . xterm--report-background-handler))))
(setq version 200))
(when (equal (match-string 1 str) "83")
;; `screen' (which returns 83;40003;0) seems to also lack support for