diff options
author | Gregory Heytings <gregory@heytings.org> | 2022-08-30 21:03:01 +0000 |
---|---|---|
committer | Gregory Heytings <gregory@heytings.org> | 2022-08-30 23:08:05 +0200 |
commit | 8807a4f53204674a796cb2db73716e09736b548e (patch) | |
tree | 1c494169d86dad2a1ad4439d39fedac85ce9bcfd /lisp | |
parent | bbc23ca8ab42d7a45bcbadd5ffd911868eb6f99d (diff) | |
download | emacs-8807a4f53204674a796cb2db73716e09736b548e.tar.gz emacs-8807a4f53204674a796cb2db73716e09736b548e.tar.bz2 emacs-8807a4f53204674a796cb2db73716e09736b548e.zip |
Enable 256 colors in fbterm.
* lisp/term/fbterm.el: New file.
* doc/misc/efaq.texi (Emacs in a Linux console): Document the TERM
environment variable with which the new file is used.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/term/fbterm.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lisp/term/fbterm.el b/lisp/term/fbterm.el new file mode 100644 index 00000000000..ad7150c1a1f --- /dev/null +++ b/lisp/term/fbterm.el @@ -0,0 +1,27 @@ +;;; fbterm.el -*- lexical-binding:t -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; Note that, in some versions of fbterm, the TERM environment +;; variable is set to "linux". When that's the case, the code below +;; will not be executed, and only 8 colors will be available. It is +;; therefore necessary, with these versions of fbterm, to set that +;; environment variable to "fbterm" to enable its 256 color mode +;; extension. See also the node "Emacs in a Linux console" of the +;; Emacs FAQ. + +(require 'term/xterm) + +(defun terminal-init-fbterm () + "Terminal initialization function for fbterm." + + ;; fbterm can't display underlines, even though its terminfo data + ;; says it can. + (tty-no-underline) + + ;; fbterm supports xterm's 256 color mode extension. + (xterm-register-default-colors xterm-standard-colors)) + +(provide 'term/fbterm) + +;;; fbterm.el ends here |