]> git.eshelyaron.com Git - emacs.git/commitdiff
Make xterm-set-window-title more robust
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 9 Aug 2021 13:43:01 +0000 (15:43 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 9 Aug 2021 13:43:01 +0000 (15:43 +0200)
* lisp/term/xterm.el (xterm-set-window-title): Don't do anything
on graphic displays (bug#49932).

lisp/term/xterm.el

index 868b33ea9c54009461beb6c4280d0e7dc8f6cc44..e63bf36cc3da064627368c1ce5668ef13a7fbce1 100644 (file)
@@ -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