15.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 (i.e., proportional) font. The font size picked for this face matches the font picked for the default (usually fixed-width) font.

variable-pitch-text

This is like the variable-pitch face (from which it inherits), but is slightly larger. A proportional font of the same height as a monospace font usually appears visually smaller, and can therefore be harder to read. When displaying longer texts, this face can be a good choice over the (slightly smaller) variable-pitch face.

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 Replacement Commands).

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 The Mark and the Region). 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 How Text Is Displayed).

homoglyph

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

nobreak-space

The face for displaying no-break space characters (see How Text Is Displayed).

nobreak-hyphen

The face for displaying no-break hyphen characters (see How Text Is Displayed).

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

mode-line

This is the base face used for the mode lines, as well as header lines 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.

The mode-line-active and mode-line-inactive faces (which are the ones used on the mode lines) inherit from this face.

mode-line-active

Like mode-line, but used for the mode line of the currently selected window. This face inherits from mode-line, so changes in that face affect mode lines in all windows.

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 Window 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 Window Fringes.

cursor

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

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.