manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

30.12.5 Colors in Formatted Text

You can specify foreground and background colors for portions of the text. There is a menu for specifying the foreground color and a menu for specifying the background color. Each color menu lists all the colors that you have used in Enriched mode in the current Emacs session.

If you specify a color with a prefix argument—or, in Transient Mark mode, if the region is not active—then it applies to any immediately following self-inserting input. Otherwise, the command applies to the region.

Each color menu contains one additional item: ‘Other’. You can use this item to specify a color that is not listed in the menu; it reads the color name with the minibuffer. To display a list of available colors and their names, use the ‘Display Colors’ menu item in the Text Properties menu (see section Editing Format Information).

Any color that you specify in this way, or that is mentioned in a formatted text file that you read in, is added to the corresponding color menu for the duration of the Emacs session.

There are no predefined key bindings for specifying colors, but you can do so with the extended commands M-x facemenu-set-foreground and M-x facemenu-set-background. Both of these commands read the name of the color with the minibuffer.


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.