summaryrefslogtreecommitdiff
path: root/devdocs/elisp/displaying-faces.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/displaying-faces.html')
-rw-r--r--devdocs/elisp/displaying-faces.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/devdocs/elisp/displaying-faces.html b/devdocs/elisp/displaying-faces.html
new file mode 100644
index 00000000..db1f287c
--- /dev/null
+++ b/devdocs/elisp/displaying-faces.html
@@ -0,0 +1,13 @@
+ <h4 class="subsection">Displaying Faces</h4> <p>When Emacs displays a given piece of text, the visual appearance of the text may be determined by faces drawn from different sources. If these various sources together specify more than one face for a particular character, Emacs merges the attributes of the various faces. Here is the order in which Emacs merges the faces, from highest to lowest priority: </p> <ul> <li> If the text consists of a special glyph, the glyph can specify a particular face. See <a href="glyphs">Glyphs</a>. </li>
+<li> If the text lies within an active region, Emacs highlights it using the <code>region</code> face. See <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Standard-Faces.html#Standard-Faces">Standard Faces</a> in <cite>The GNU Emacs Manual</cite>. </li>
+<li> If the text lies within an overlay with a non-<code>nil</code> <code>face</code> property, Emacs applies the face(s) specified by that property. If the overlay has a <code>mouse-face</code> property and the mouse is near enough to the overlay, Emacs applies the face or face attributes specified by the <code>mouse-face</code> property instead. See <a href="overlay-properties">Overlay Properties</a>. <p>When multiple overlays cover one character, an overlay with higher priority overrides those with lower priority. See <a href="overlays">Overlays</a>. </p> </li>
+<li> If the text contains a <code>face</code> or <code>mouse-face</code> property, Emacs applies the specified faces and face attributes. See <a href="special-properties">Special Properties</a>. (This is how Font Lock mode faces are applied. See <a href="font-lock-mode">Font Lock Mode</a>.) </li>
+<li> If the text lies within the mode line of the selected window, Emacs applies the <code>mode-line</code> face. For the mode line of a non-selected window, Emacs applies the <code>mode-line-inactive</code> face. For a header line, Emacs applies the <code>header-line</code> face. For a tab line, Emacs applies the <code>tab-line</code> face. </li>
+<li> If the text comes from an overlay string via <code>before-string</code> or <code>after-string</code> properties (see <a href="overlay-properties">Overlay Properties</a>), or from a display string (see <a href="other-display-specs">Other Display Specs</a>), and the string doesn’t contain a <code>face</code> or <code>mouse-face</code> property, or these properties leave some face attributes undefined, but the buffer text affected by the overlay/display property does define a face or those attributes, Emacs applies the face attributes of the “underlying” buffer text. Note that this is so even if the overlay or display string is displayed in the display margins (see <a href="display-margins">Display Margins</a>). </li>
+<li> If any given attribute has not been specified during the preceding steps, Emacs applies the attribute of the <code>default</code> face. </li>
+</ul> <p>At each stage, if a face has a valid <code>:inherit</code> attribute, Emacs treats any attribute with an <code>unspecified</code> value as having the corresponding value drawn from the parent face(s). see <a href="face-attributes">Face Attributes</a>. Note that the parent face(s) may also leave the attribute unspecified; in that case, the attribute remains unspecified at the next level of face merging. </p><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Faces.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Faces.html</a>
+ </p>
+</div>