Function: xterm--query-name-and-version

xterm--query-name-and-version is a byte-compiled function defined in xterm.el.gz.

Signature

(xterm--query-name-and-version)

Documentation

Get the terminal name and version string (XTVERSION).

Source Code

;; Defined in /usr/src/emacs/lisp/term/xterm.el.gz
(defun xterm--query-name-and-version ()
  "Get the terminal name and version string (XTVERSION)."
  ;; Reduce query timeout time. The default value causes a noticeable
  ;; startup delay on terminals that ignore the query.
  (let ((xterm-query-timeout 0.1))
    (catch 'result
      (xterm--query
       "\e[>0q"
       `(("\eP>|" . ,(lambda ()
                       ;; The reply should be: \e P > | STRING \e \\
                       (let ((str (xterm--read-string ?\e ?\\)))
                         (throw 'result str))))))
      nil)))