aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/display.texi
diff options
context:
space:
mode:
Diffstat (limited to 'lispref/display.texi')
-rw-r--r--lispref/display.texi40
1 files changed, 25 insertions, 15 deletions
diff --git a/lispref/display.texi b/lispref/display.texi
index 678ca657b5b..e762c14a7f0 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1857,9 +1857,9 @@ as if they had a light background.
1857 1857
1858 The effect of using a face is determined by a fixed set of @dfn{face 1858 The effect of using a face is determined by a fixed set of @dfn{face
1859attributes}. This table lists all the face attributes, and what they 1859attributes}. This table lists all the face attributes, and what they
1860mean. Note that in general, more than one face can be specified for a 1860mean. You can specify more than one face for a given piece of text;
1861given piece of text; when that happens, the attributes of all the faces 1861Emacs merges the attributes of all the faces to determine how to
1862are merged to specify how to display the text. @xref{Displaying Faces}. 1862display the text. @xref{Displaying Faces}.
1863 1863
1864 Any attribute in a face can have the value @code{unspecified}. This 1864 Any attribute in a face can have the value @code{unspecified}. This
1865means the face doesn't specify that attribute. In face merging, when 1865means the face doesn't specify that attribute. In face merging, when
@@ -2048,15 +2048,13 @@ suitable for use with @code{:stipple} (see above). It returns
2048@node Attribute Functions 2048@node Attribute Functions
2049@subsection Face Attribute Functions 2049@subsection Face Attribute Functions
2050 2050
2051 You can modify the attributes of an existing face with the following 2051 This section describes the functions for accessing and modifying the
2052functions. If you specify @var{frame}, they affect just that frame; 2052attributes of an existing face.
2053otherwise, they affect all frames as well as the defaults that apply to
2054new frames.
2055 2053
2056@defun set-face-attribute face frame &rest arguments 2054@defun set-face-attribute face frame &rest arguments
2057This function sets one or more attributes of face @var{face} 2055This function sets one or more attributes of face @var{face} for frame
2058for frame @var{frame}. If @var{frame} is @code{nil}, it sets 2056@var{frame}. The attributes you specify this way override whatever
2059the attribute for all frames, and the defaults for new frames. 2057the @code{defface} says.
2060 2058
2061The extra arguments @var{arguments} specify the attributes to set, and 2059The extra arguments @var{arguments} specify the attributes to set, and
2062the values for them. They should consist of alternating attribute names 2060the values for them. They should consist of alternating attribute names
@@ -2073,6 +2071,13 @@ Thus,
2073@noindent 2071@noindent
2074sets the attributes @code{:width}, @code{:weight} and @code{:underline} 2072sets the attributes @code{:width}, @code{:weight} and @code{:underline}
2075to the corresponding values. 2073to the corresponding values.
2074
2075If @var{frame} is @code{t}, this function sets the default attributes
2076for new frames. Default attribute values specified this way override
2077the @code{defface} for newly created frames.
2078
2079If @var{frame} is @code{nil}, this function sets the attributes for
2080all existing frames, and the default for new frames.
2076@end defun 2081@end defun
2077 2082
2078@defun face-attribute face attribute &optional frame inherit 2083@defun face-attribute face attribute &optional frame inherit
@@ -2080,8 +2085,10 @@ This returns the value of the @var{attribute} attribute of face
2080@var{face} on @var{frame}. If @var{frame} is @code{nil}, 2085@var{face} on @var{frame}. If @var{frame} is @code{nil},
2081that means the selected frame (@pxref{Input Focus}). 2086that means the selected frame (@pxref{Input Focus}).
2082 2087
2083If @var{frame} is @code{t}, the value is the default for 2088If @var{frame} is @code{t}, this returns whatever new-frames default
2084@var{face} for new frames. 2089value you previously specified with @code{set-face-attribute} for the
2090@var{attribute} attribute of @var{face}. If you have not specified
2091one, it returns @code{nil}.
2085 2092
2086If @var{inherit} is @code{nil}, only attributes directly defined by 2093If @var{inherit} is @code{nil}, only attributes directly defined by
2087@var{face} are considered, so the return value may be 2094@var{face} are considered, so the return value may be
@@ -2135,6 +2142,8 @@ face attribute @var{attribute}, returns @var{value1} unchanged.
2135 The functions above did not exist before Emacs 21. For compatibility 2142 The functions above did not exist before Emacs 21. For compatibility
2136with older Emacs versions, you can use the following functions to set 2143with older Emacs versions, you can use the following functions to set
2137and examine the face attributes which existed in those versions. 2144and examine the face attributes which existed in those versions.
2145They use values of @code{t} and @code{nil} for @var{frame}
2146just like @code{set-face-attribute} and @code{face-attribute}.
2138 2147
2139@defun set-face-foreground face color &optional frame 2148@defun set-face-foreground face color &optional frame
2140@defunx set-face-background face color &optional frame 2149@defunx set-face-background face color &optional frame
@@ -2191,9 +2200,10 @@ This function swaps the foreground and background colors of face
2191@end defun 2200@end defun
2192 2201
2193 These functions examine the attributes of a face. If you don't 2202 These functions examine the attributes of a face. If you don't
2194specify @var{frame}, they refer to the default data for new frames. 2203specify @var{frame}, they refer to the selected frame; @code{t} refers
2195They return the symbol @code{unspecified} if the face doesn't define any 2204to the default data for new frames. They return the symbol
2196value for that attribute. 2205@code{unspecified} if the face doesn't define any value for that
2206attribute.
2197 2207
2198@defun face-foreground face &optional frame inherit 2208@defun face-foreground face &optional frame inherit
2199@defunx face-background face &optional frame inherit 2209@defunx face-background face &optional frame inherit