Copyright (C) 2000-2012 |
GNU Info (elisp)Merging FacesMerging Faces for Display ------------------------- Here are the ways to specify which faces to use for display of text: * With defaults. The `default' face is used as the ultimate default for all text. (In Emacs 19 and 20, the `default' face is used only when no other face is specified.) For a mode line or header line, the face `modeline' or `header-line' is used just before `default'. * With text properties. A character can have a `face' property; if so, the faces and face attributes specified there apply. Note: Special Properties. If the character has a `mouse-face' property, that is used instead of the `face' property when the mouse is "near enough" to the character. * With overlays. An overlay can have `face' and `mouse-face' properties too; they apply to all the text covered by the overlay. * With a region that is active. In Transient Mark mode, the region is highlighted with the face `region' (Note: Standard Faces). * With special glyphs. Each glyph can specify a particular face number. Note: Glyphs. If these various sources together specify more than one face for a particular character, Emacs merges the attributes of the various faces specified. The attributes of the faces of special glyphs come first; then comes the face for region highlighting, if appropriate; then come attributes of faces from overlays, followed by those from text properties, and last the default face. When multiple overlays cover one character, an overlay with higher priority overrides those with lower priority. Note: Overlays. In Emacs 20, if an attribute such as the font or a color is not specified in any of the above ways, the frame's own font or color is used. In newer Emacs versions, this cannot happen, because the `default' face specifies all attributes--in fact, the frame's own font and colors are synonymous with those of the default face. automatically generated by info2www version 1.2.2.9 |