ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial

18.6 Standard Faces

To see what faces are currently defined, and what they look like, type M-x list-faces-display. It's possible for a given face to look different in different frames; this command shows the appearance in the frame in which you type it. With a prefix argument, this prompts for a regular expression, and displays only faces with names matching that regular expression.

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.
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.
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 highlighting portions of text, in various modes. For example, mouse-sensitive text is highlighted using this face.
isearch
This face is used for highlighting the current Isearch match (see Incremental Search).
query-replace
This face is used for highlighting the current Query Replace match (see Replace).
lazy-highlight
This face is used for lazy highlighting of Isearch and Query Replace matches other than the current one.
region
This face is used for displaying a selected region (see Mark).
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.
nobreak-space
The face for displaying the character “nobreak space.”
escape-glyph
The face for highlighting the ‘\’ or ‘^’ that indicates a control character. It's also used when ‘\’ indicates a nobreak space or nobreak (soft) hyphen.

These faces control the appearance of parts of the Emacs frame. They exist as faces to provide a consistent way to customize the appearance of these parts of the 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 portions of text on mode lines.
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.
vertical-border
This face is used for the vertical divider between windows. By default this face inherits from the mode-line-inactive face on character terminals. On graphical displays the foreground color of this face is used for the vertical line between windows without scrollbars.
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 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.
scroll-bar
This face determines the visual appearance of the scroll bar. See Scroll Bars.
border
This face determines the color of the frame border.
cursor
This face determines the color of the cursor.
mouse
This face determines the color of the mouse pointer.
tool-bar
This face determines the color of tool bar icons. See Tool Bars.
tooltip
This face is used for tooltips. See Tooltips.
menu
This face determines the colors and font of Emacs's menus. See Menu Bars. This has no effect in Emacs built with GTK and in the MS-Windows/Mac ports; you need to use system-wide styles and options to change the appearance of GTK, Windows, or Mac menus. Setting the font of LessTif/Motif menus is currently not supported; attempts to set the font are ignored in this case.
blog comments powered by Disqus