Mercurial > emacs
comparison lispref/display.texi @ 72175:c9a89b23ca0f
(Face Attributes): Simplify wording.
(Attribute Functions): Clarify meaning of new-frame default
attribute settings.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 29 Jul 2006 02:26:45 +0000 |
parents | 92e52d7e4ecd |
children | 513c469ffd50 |
comparison
equal
deleted
inserted
replaced
72174:a2038efe61ed | 72175:c9a89b23ca0f |
---|---|
1855 @subsection Face Attributes | 1855 @subsection Face Attributes |
1856 @cindex face attributes | 1856 @cindex face attributes |
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 |
1859 attributes}. This table lists all the face attributes, and what they | 1859 attributes}. This table lists all the face attributes, and what they |
1860 mean. Note that in general, more than one face can be specified for a | 1860 mean. You can specify more than one face for a given piece of text; |
1861 given piece of text; when that happens, the attributes of all the faces | 1861 Emacs merges the attributes of all the faces to determine how to |
1862 are merged to specify how to display the text. @xref{Displaying Faces}. | 1862 display 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 |
1865 means the face doesn't specify that attribute. In face merging, when | 1865 means the face doesn't specify that attribute. In face merging, when |
1866 the first face fails to specify a particular attribute, that means the | 1866 the first face fails to specify a particular attribute, that means the |
1867 next face gets a chance. However, the @code{default} face must | 1867 next face gets a chance. However, the @code{default} face must |
2052 functions. If you specify @var{frame}, they affect just that frame; | 2052 functions. If you specify @var{frame}, they affect just that frame; |
2053 otherwise, they affect all frames as well as the defaults that apply to | 2053 otherwise, they affect all frames as well as the defaults that apply to |
2054 new frames. | 2054 new frames. |
2055 | 2055 |
2056 @defun set-face-attribute face frame &rest arguments | 2056 @defun set-face-attribute face frame &rest arguments |
2057 This function sets one or more attributes of face @var{face} | 2057 This function sets one or more attributes of face @var{face} for frame |
2058 for frame @var{frame}. If @var{frame} is @code{nil}, it sets | 2058 @var{frame}. The attributes you specify this way override whatever |
2059 the attribute for all frames, and the defaults for new frames. | 2059 the @code{defface} says. |
2060 | 2060 |
2061 The extra arguments @var{arguments} specify the attributes to set, and | 2061 The extra arguments @var{arguments} specify the attributes to set, and |
2062 the values for them. They should consist of alternating attribute names | 2062 the values for them. They should consist of alternating attribute names |
2063 (such as @code{:family} or @code{:underline}) and corresponding values. | 2063 (such as @code{:family} or @code{:underline}) and corresponding values. |
2064 Thus, | 2064 Thus, |
2071 @end example | 2071 @end example |
2072 | 2072 |
2073 @noindent | 2073 @noindent |
2074 sets the attributes @code{:width}, @code{:weight} and @code{:underline} | 2074 sets the attributes @code{:width}, @code{:weight} and @code{:underline} |
2075 to the corresponding values. | 2075 to the corresponding values. |
2076 | |
2077 If @var{frame} is @code{t}, this function sets the attributes for all | |
2078 existing frames, and sets defaults that will apply for new frames. | |
2079 Default attribute values specified this way override the | |
2080 @code{defface} for newly created 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 |
2079 This returns the value of the @var{attribute} attribute of face | 2084 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}, |
2081 that means the selected frame (@pxref{Input Focus}). | 2086 that means the selected frame (@pxref{Input Focus}). |
2082 | 2087 |
2083 If @var{frame} is @code{t}, the value is the default for | 2088 If @var{frame} is @code{t}, this returns whatever new-frames default |
2084 @var{face} for new frames. | 2089 value you previously specified with @code{set-face-attribute} for the |
2090 @var{attribute} attribute of @var{face}. If you have not specified | |
2091 one, it returns @code{nil}. | |
2085 | 2092 |
2086 If @var{inherit} is @code{nil}, only attributes directly defined by | 2093 If @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 |
2088 @code{unspecified}, or a relative value. If @var{inherit} is | 2095 @code{unspecified}, or a relative value. If @var{inherit} is |
2089 non-@code{nil}, @var{face}'s definition of @var{attribute} is merged | 2096 non-@code{nil}, @var{face}'s definition of @var{attribute} is merged |