1 ;;; tmux.el --- terminal initialization for tmux -*- lexical-binding: t -*-
2 ;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
6 (defcustom xterm-tmux-extra-capabilities
'(modifyOtherKeys)
7 "Extra capabilities supported under \"tmux\".
8 Some features of tmux depend on the terminal emulator in which
9 it runs, which can change when the tmux session is moved to another tty."
11 :type xterm--extra-capabilities-type
14 (defun terminal-init-tmux ()
15 "Terminal initialization function for tmux."
16 ;; Treat a tmux terminal similar to an xterm, but don't use
17 ;; xterm-extra-capabilities's `check' setting since that doesn't seem
18 ;; to work so well (it depends too much on the surrounding terminal
19 ;; emulator, which can change during the session, bug#20356).
20 (let ((xterm-extra-capabilities xterm-tmux-extra-capabilities
))
21 (tty-run-terminal-initialization (selected-frame) "xterm")))