summaryrefslogtreecommitdiff
path: root/lisp/term/screen.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-05-03 22:24:20 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-05-03 22:24:20 -0400
commit4183482f4dd3c1a96c817d1598024952b82a7e59 (patch)
treeb8e6e28a8ad99f4ce98f59a1703e707e043c0495 /lisp/term/screen.el
parentb7bb71c801ecd9afa09f260ca7dbe7a5677cf9e0 (diff)
downloademacs-4183482f4dd3c1a96c817d1598024952b82a7e59.tar.gz
* lisp/term/screen.el (xterm-screen-extra-capabilities): New custom
(terminal-init-screen): Use it (bug#20356). * lisp/term/xterm.el: Provide `term/xterm' instead of `xterm'. (xterm--extra-capabilities-type): New const. (xterm-extra-capabilities): Use it. (xterm--version-handler): Lower the pseudo-version for `screen'.
Diffstat (limited to 'lisp/term/screen.el')
-rw-r--r--lisp/term/screen.el17
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/term/screen.el b/lisp/term/screen.el
index 3587c4f95e5..41fd916a785 100644
--- a/lisp/term/screen.el
+++ b/lisp/term/screen.el
@@ -1,9 +1,22 @@
;;; screen.el --- terminal initialization for screen and tmux -*- lexical-binding: t -*-
;; Copyright (C) 1995, 2001-2015 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