Next: , Previous: , Up: Display   [Contents][Index]

14.10 Standard Faces

Here are the standard faces for specifying text appearance. You can apply them to specific text when you want the effects they produce.

default

This face is used for ordinary text that doesn’t specify any face. Its background color is used as the frame’s background color.

bold

This face uses a bold variant of the default font.

italic

This face uses an italic variant of the default font.

bold-italic

This face uses a bold italic variant of the default font.

underline

This face underlines text.

fixed-pitch

This face forces use of a fixed-width font. It’s reasonable to customize this face to use a different fixed-width font, if you like, but you should not make it a variable-width font.

fixed-pitch-serif

This face is like fixed-pitch, except the font has serifs and looks more like traditional typewriting.

variable-pitch

This face forces use of a variable-width font.

shadow

This face is used for making the text less noticeable than the surrounding ordinary text. Usually this can be achieved by using shades of gray in contrast with either black or white default foreground color.

Here’s an incomplete list of faces used to highlight parts of the text temporarily for specific purposes. (Many other modes define their own faces for this purpose.)

highlight

This face is used for text highlighting in various contexts, such as when the mouse cursor is moved over a hyperlink.

isearch

This face is used to highlight the current Isearch match (see Incremental Search).

query-replace

This face is used to highlight the current Query Replace match (see Replace).

lazy-highlight

This face is used to highlight lazy matches for Isearch and Query Replace (matches other than the current one).

region

This face is used for displaying an active region (see Mark). When Emacs is built with GTK+ support, its colors are taken from the current GTK+ theme.

secondary-selection

This face is used for displaying a secondary X selection (see Secondary Selection).

trailing-whitespace

The face for highlighting excess spaces and tabs at the end of a line when show-trailing-whitespace is non-nil (see Useless Whitespace).

escape-glyph

The face for displaying control characters and escape sequences (see Text Display).

homoglyph

The face for displaying lookalike characters, i.e., characters that look like but are not the characters being represented (see Text Display).

nobreak-space

The face for displaying no-break space characters (see Text Display).

nobreak-hyphen

The face for displaying no-break hyphen characters (see Text Display).

The following faces control the appearance of parts of the Emacs frame:

mode-line

This face is used for the mode line of the currently selected window, and for menu bars when toolkit menus are not used. By default, it’s drawn with shadows for a raised effect on graphical displays, and drawn as the inverse of the default face on non-windowed terminals.

mode-line-inactive

Like mode-line, but used for mode lines of the windows other than the selected one (if mode-line-in-non-selected-windows is non-nil). This face inherits from mode-line, so changes in that face affect mode lines in all windows.

mode-line-highlight

Like highlight, but used for mouse-sensitive portions of text on mode lines. Such portions of text typically pop up tooltips (see Tooltips) when the mouse pointer hovers above them.

mode-line-buffer-id

This face is used for buffer identification parts in the mode line.

header-line

Similar to mode-line for a window’s header line, which appears at the top of a window just as the mode line appears at the bottom. Most windows do not have a header line—only some special modes, such Info mode, create one.

header-line-highlight

Similar to highlight and mode-line-highlight, but used for mouse-sensitive portions of text on header lines. This is a separate face because the header-line face might be customized in a way that does not interact well with highlight.

tab-line

Similar to mode-line for a window’s tab line, which appears at the top of a window with tabs representing window buffers. See Tab Line.

vertical-border

This face is used for the vertical divider between windows on text terminals.

minibuffer-prompt

This face is used for the prompt strings displayed in the minibuffer. By default, Emacs automatically adds this face to the value of minibuffer-prompt-properties, which is a list of text properties (see Text Properties in the Emacs Lisp Reference Manual) used to display the prompt text. (This variable takes effect when you enter the minibuffer.)

fringe

The face for the fringes to the left and right of windows on graphic displays. (The fringes are the narrow portions of the Emacs frame between the text area and the window’s right and left borders.) See Fringes.

cursor

The :background attribute of this face specifies the color of the text cursor. See Cursor Display.

tooltip

This face is used for tooltip text. By default, if Emacs is built with GTK+ support, tooltips are drawn via GTK+ and this face has no effect. See Tooltips.

mouse

This face determines the color of the mouse pointer.

The following faces likewise control the appearance of parts of the Emacs frame, but only on text terminals, or when Emacs is built on X with no toolkit support. (For all other cases, the appearance of the respective frame elements is determined by system-wide settings.)

scroll-bar

This face determines the visual appearance of the scroll bar. See Scroll Bars.

tool-bar

This face determines the color of tool bar icons. See Tool Bars.

tab-bar

This face determines the color of tab bar icons. See Tab Bars.

menu

This face determines the colors and font of Emacs’s menus. See Menu Bars.

tty-menu-enabled-face

This face is used to display enabled menu items on text-mode terminals.

tty-menu-disabled-face

This face is used to display disabled menu items on text-mode terminals.

tty-menu-selected-face

This face is used to display on text-mode terminals the menu item that would be selected if you click a mouse or press RET.

Next: , Previous: , Up: Display   [Contents][Index]