emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A new feature of color support for tty's


From: Eli Zaretskii
Subject: A new feature of color support for tty's
Date: Mon, 14 Jan 2002 16:13:50 +0200 (IST)

I installed today code which adds support for the --color command-line 
option.  This is supposed to be used when your termcap/terminfo entry 
lies about the color support, or if you login remotely using a terminal 
emulator which supports colors, but sets TERM to a name of some 
color-incapable terminal.

In such cases, invoking Emacs with --color will force Emacs to use the 
standard ANSI escape sequences for 8 text colors, like "ls --color" does 
in GNU `ls'.  (So if "ls --color" works for you, so should "emacs --color".)

The --color switch is ignored in all versions and ports except the GNU or 
Unix versions running on a tty or a terminal emulator.  If some other 
version fails to build or somehow reacts to this argument, please report 
that as a bug.

Please give this a try and see whether you like it.

The support for this feature works by defining a new frame parameter 
`tty-color-mode'.  So you may now say

  (modify-frame-parameters (selected-frame) '((tty-color-mode . yes)))

and turn on colors in the middle of a session, or in your .emacs file.  A 
side effect of this change is that you can now have frames with and 
without colors in the same session.

For now, only the ANSI color commands for the 8 standard colors are 
supported (support for more modes is in the works).

Both the --color switch and the tty-color-mode parameter are documented 
in the respective manuals, so please look there for more info (no, I 
didn't tell the whole story ;-).

Enjoy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]