Faces are declared with defface
.
doc is the face documentation.
spec should be an alist whose elements have the form
(display atts)
(see below). When defface
executes, it defines the face according to spec, then uses any
customizations saved in the `.emacs' file to override that
specification.
In each element of spec, atts is a list of face attributes
and their values. The possible attributes are defined in the variable
custom-face-attributes
.
The display part of an element of spec determines which frames the element applies to. If more than one element of spec matches a given frame, the first matching element is the only one used for that frame.
If display is t
in a spec element, that element
matches all frames. (This means that any subsequent elements of
spec are never used.)
Alternatively, display can be an alist whose elements have the
form (characteristic value...)
. Here
characteristic specifies a way of classifying frames, and the
values are possible classifications which display should
apply to. Here are the possible values of characteristic:
type
x
, pc
(for the MS-DOS console), w32
(for MS Windows 9X/NT), or
tty
.
class
color
,
grayscale
, or mono
.
background
light
or dark
.
If an element of display specifies more than one value for a given characteristic, any of those values is acceptable. If an element of display has elements for more than one characteristic, then each characteristic of the frame must match one of the values specified for it.
Internally, defface
uses the symbol property
face-defface-spec
to record the face attributes specified in
defface
, saved-face
for the attributes saved by the user
with the customization buffer, and face-documentation
for the
documentation string.
Go to the first, previous, next, last section, table of contents.