* term/eat.el: New file.

This commit is contained in:
Akib Azmain Turja 2022-12-04 12:52:36 +06:00
parent 85c0c16380
commit 468fe893cf
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

50
term/eat.el Normal file
View file

@ -0,0 +1,50 @@
;;; eat.el --- Terminal initialization for Eat -*- lexical-binding: t; -*-
;; Copyright (C) 2022 Akib Azmain Turja.
;; Author: Akib Azmain Turja <akib@disroot.org>
;; Created: 2022-12-04
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; For a full copy of the GNU General Public License
;; see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Extra support for the Eat terminal emulator.
;;; Code:
(require 'term/xterm)
(defcustom xterm-eat-extra-capabilities
'(modifyOtherKeys reportBackground getSelection setSelection)
"List of extra capabilities supported in Eat.
Each element of the list enables a feature. The elements can be:
`modifyOtherKeys' More key bindings work (e.g., \"\\C-,\")
`reportBackground' Eat reports the terminal background color.
`getSelection' Eat yanks text from parent Emacs `kill-ring'.
`setSelection' Eat saves killed text to parent Emacs `kill-ring'."
:type xterm--extra-capabilities-type
:group 'eat)
(defun terminal-init-eat ()
"Terminal initialization function for Eat."
(let ((xterm-extra-capabilities xterm-eat-extra-capabilities))
(tty-run-terminal-initialization (selected-frame) "xterm")))
(provide 'term/eat)
;;; eat.el ends here