1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
emacs/lisp/term/linux.el
Lars Ingebrigtsen 15a8026caf Disable auto compositions on the Linux console only
* lisp/term/linux.el (terminal-init-linux): Disable auto
compositions on "linux" consoles (bug#21363).

* src/composite.c (inhibit_auto_composition): New function to
implement this.
(composition_compute_stop_pos, composition_adjust_point)
(Ffind_composition_internal): Use it.
(syms_of_composite): Document it.

* src/lisp.h: Export tty_type_name.

* src/term.c (tty_type_name): Factored out.
(Ftty_type): Use it.
2021-08-18 16:24:40 +02:00

30 lines
802 B
EmacsLisp

;;; linux.el -*- lexical-binding:t -*-
;; The Linux console handles Latin-1 by default.
(declare-function gpm-mouse-enable "t-mouse" ())
(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")
(ignore-errors (when gpm-mouse-mode (require 't-mouse) (gpm-mouse-enable)))
;; 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