[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possible to have 256 colors in Emacs on framebuffer-enabled tt
From: |
zwz |
Subject: |
Re: Is it possible to have 256 colors in Emacs on framebuffer-enabled tty |
Date: |
Thu, 01 Sep 2011 22:28:18 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Wolfgang Jenkner <address@hidden> writes:
> Eli Zaretskii <address@hidden> writes:
>
>>> From: zwz <address@hidden>
>>> Date: Tue, 30 Aug 2011 22:05:50 +0800
>>>
>>> Do you mean if there is a lisp/term/fbterm.el that deals with the
>>> escapes, then it is possible to have 256 colors in Emacs on fbterm?
>>
>> No, such an fbterm.el does not exist. But given enough information
>> about this terminal, it could be written in a way that's similar to
>> xterm.el.
>
> I think the 256 colors support in term/xterm.el is general enough to
> support fbterm as well. At least the following quick'n'dirty adaption
> from term/linux.el seems to work for that (provided the terminfo stuff
> is correctly installed, TERM is set to fbterm and the code below is
> saved to term/fbterm.el somewhere in load-path).
>
> #+BEGIN_SRC emacs-lisp
> ;; -*- no-byte-compile: t -*-
>
> (load "term/xterm")
>
> (defun terminal-init-fbterm ()
> "Terminal initialization function for linux fbterm."
> (unless (terminal-coding-system)
> (set-terminal-coding-system 'utf-8-unix))
>
> ;; It can't really display underlines.
> (tty-no-underline)
>
> (ignore-errors (when gpm-mouse-mode (require 't-mouse)
> (gpm-mouse-enable)))
>
> (xterm-register-default-colors))
>
> ;;; fbterm.el ends here
> #+END_SRC
Great, the code works!
Is it a good idea to make it the default code to run when Emacs can not
find the right term/*.el if term/xterm.el is really general enough?
- Re: Is it possible to have 256 colors in Emacs on framebuffer-enabled tty,
zwz <=