From: Lars Ingebrigtsen Date: Mon, 9 Aug 2021 13:43:01 +0000 (+0200) Subject: Make xterm-set-window-title more robust X-Git-Tag: emacs-28.0.90~1576 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89d02841ab8af0a56b6c7e89790109bf8f67c10e;p=emacs.git Make xterm-set-window-title more robust * lisp/term/xterm.el (xterm-set-window-title): Don't do anything on graphic displays (bug#49932). --- diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 868b33ea9c5..e63bf36cc3d 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -944,9 +944,10 @@ See `xterm--init-frame-title'" (defun xterm-set-window-title (&optional terminal) "Set the window title of the Xterm TERMINAL. The title is constructed from `frame-title-format'." - (send-string-to-terminal - (format "\e]2;%s\a" (format-mode-line frame-title-format)) - terminal)) + (unless (display-graphic-p terminal) + (send-string-to-terminal + (format "\e]2;%s\a" (format-mode-line frame-title-format)) + terminal))) (defun xterm--selection-char (type) (pcase type