1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00
emacs/lisp/term/linux.el
Jared Finder 46fe7a17f5 Fix dragging mode line on text terminals with a mouse (bug#67457)
* lisp/xt-mouse.el (xterm-mouse-translate-1): Fix the 'event-kind'
property of mouse-movement symbols emitted by xt-mouse.
* lisp/term/linux.el (terminal-init-linux): Call 'gpm-mouse-mode'
to set up the terminal for the mouse, if needed.
2023-12-09 10:17:05 +02:00

32 lines
925 B
EmacsLisp

;;; linux.el -*- lexical-binding:t -*-
;; The Linux console handles Latin-1 by default.
(defun terminal-init-linux ()
"Terminal initialization function for linux."
(unless (terminal-coding-system)
(set-terminal-coding-system 'iso-latin-1))
;; It can't really display underlines.
(tty-no-underline)
;; Compositions confuse cursor movement.
(setq-default auto-composition-mode "linux")
;; Ensure additional terminal setup is done when `gpm-mouse-mode' is
;; enabled.
(ignore-errors (when gpm-mouse-mode (gpm-mouse-mode 1)))
;; Don't translate ESC TAB to backtab as directed by ncurses-6.3.
(define-key input-decode-map "\e\t" nil)
;; Make Latin-1 input characters work, too.
;; Meta will continue to work, because the kernel turns that into Escape.
;; The arg only matters in that it is not t or nil.
(set-input-meta-mode 'iso-latin-1))
(provide 'term/linux)
;;; linux.el ends here