]> code.delx.au - gnu-emacs/blobdiff - lisp/term/screen.el
Update copyright year to 2016
[gnu-emacs] / lisp / term / screen.el
index 3587c4f95e5850ec5d22889964a09f2aeadd0268..704fbefb0ad8120b037677f09bfe49ed78aec6d6 100644 (file)
@@ -1,9 +1,22 @@
 ;;; screen.el --- terminal initialization for screen and tmux  -*- lexical-binding: t -*-
-;; Copyright (C) 1995, 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2016 Free Software Foundation, Inc.
+
+(require 'term/xterm)
+
+(defcustom xterm-screen-extra-capabilities '(modifyOtherKeys)
+  "Extra capabilities supported under \"screen\".
+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."
+  :type xterm--extra-capabilities-type
+  :group 'xterm)
 
 (defun terminal-init-screen ()
   "Terminal initialization function for screen."
-  ;; Treat a screen terminal similar to an xterm.
-  (tty-run-terminal-initialization (selected-frame) "xterm"))
+  ;; Treat a screen terminal similar to an xterm, but don't use
+  ;; xterm-extra-capabilities's `check' setting since that doesn't seem
+  ;; to work so well (it depends too much on the surrounding terminal
+  ;; emulator, which can change during the session, bug#20356).
+  (let ((xterm-extra-capabilities xterm-screen-extra-capabilities))
+    (tty-run-terminal-initialization (selected-frame) "xterm")))
 
 ;; screen.el ends here