Basic Faces
If your Emacs Lisp program needs to assign some faces to text, it is often a good idea to use certain existing faces or inherit from them, rather than defining entirely new faces. This way, if other users have customized those existing faces to give Emacs a certain look, your program will fit in without additional customization.
Some of the basic faces defined in Emacs are listed below. In addition to these, you might want to make use of the Font Lock faces for syntactic highlighting, if highlighting is not already handled by Font Lock mode, or if some Font Lock faces are not in use. See Faces for Font Lock.
default-
The default face, whose attributes are all specified. All other faces implicitly inherit from it: any unspecified attribute defaults to the attribute on this face (see Face Attributes).
-
mode-line-active mode-line-inactiveheader-linetab-line-
Basic faces used for the mode line, header line, and tab line.
-
tool-bar tab-barfringescroll-barwindow-dividerborderchild-frame-border-
Basic faces used for the corresponding decorations of GUI frames.
-
cursor -
The basic face used for the text cursor.
-
margin -
The basic face used for window margins, both on the left and on the right. It is commonly used to customize the background of the empty areas of the margins, and it also provides the base attributes for strings displayed in the margins (see Displaying in the Margins). It inherits from the
defaultface. -
mouse -
The basic face used for displaying mouse-sensitive text when the mouse pointer is on that text.
bolditalicbold-italicunderlinefixed-pitchfixed-pitch-serifvariable-pitch-
These have the attributes indicated by their names (e.g.,
boldhas a bold:weightattribute), with all other attributes unspecified (and so given bydefault). -
shadow -
For dimmed-out text. For example, it is used for the ignored part of a filename in the minibuffer (see Minibuffers for File Names in The GNU Emacs Manual).
linklink-visited-
For clickable text buttons that send the user to a different buffer or location.
highlight-
For stretches of text that should temporarily stand out. For example, it is commonly assigned to the
mouse-faceproperty for cursor highlighting (see Properties with Special Meanings). -
match isearchlazy-highlight-
For text matching (respectively) permanent search matches, interactive search matches, and lazy highlighting other matches than the current interactive one.
-
error warningsuccessFor text concerning errors, warnings, or successes. For example, these are used for messages in *Compilation* buffers.
Copyright © 1990-1996, 1998-2026 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Basic-Faces.html