]> git.eshelyaron.com Git - emacs.git/commitdiff
stterm doesn't understand all codes that xterm does
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 19 Aug 2021 12:18:27 +0000 (14:18 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 19 Aug 2021 12:18:32 +0000 (14:18 +0200)
* lisp/term/st.el (xterm-st-extra-capabilities): New user option
(bug#50119).
(terminal-init-st): Use it to avoid a two-second timeout.

lisp/term/st.el

index 9a1c0646f89769c6389e397da5a91ad9525fcfa7..e1db450b3e7983c78a737cb468c12df55504e676 100644 (file)
 
 (require 'term/xterm)
 
+(defcustom xterm-st-extra-capabilities '( modifyOtherKeys getSelection
+                                          setSelection)
+  "Extra capabilities supported under \"stterm\".
+Some features of screen depend on the terminal emulator in which
+it runs, which can change when the screen session is moved to another tty."
+  :version "28.1"
+  :type xterm--extra-capabilities-type
+  :group 'xterm)
+
 (defun terminal-init-st ()
   "Terminal initialization function for st."
-  (tty-run-terminal-initialization (selected-frame) "xterm"))
+  ;; Using `check' leads to a two-second timeout.
+  (let ((xterm-extra-capabilities xterm-st-extra-capabilities))
+    (tty-run-terminal-initialization (selected-frame) "xterm")))
 
 (provide 'term/st)