Sams Teach Yourself Emacs in 24 Hours

ContentsIndex

Hour 12: Visible Editing Utilities

Previous HourNext Hour

Sections in this Hour:

 

Changing the Foreground and Background Color in UNIX

Besides changing the font and size of X resources you can also change the background and foreground colors, also known as the color of the background and the color of the text. To make the text white on a black background, insert the following into your .Xdefaults file:


Emacs*Background: black 
Emacs*Foreground: white 

To obtain black text on a white background (which is the default in GNU Emacs, but not in XEmacs) insert the following instead:


Emacs*Background: white 
Emacs*Foreground: black 

Finally if you want something that your boss will describe as bizarre, try


Emacs*Background: blue 
Emacs*Foreground: yellow 

Caution - Changing the colors of the foreground and background will not affect the colors used in font-lock mode (described in the next section). This is unfortunate because the colors will have the inverse meaning, when the background and foreground are transposed. For example, in normal color setup (black on white) light yellow is not a color seen easily, while dark blue is. On the other hand in inverse setup (white on black) light yellow is very easily seen, while dark blue is not. Thus you should only use white on black if you know what you do!


Sams Teach Yourself Emacs in 24 Hours

ContentsIndex

Hour 12: Visible Editing Utilities

Previous HourNext Hour

Sections in this Hour: