Mercurial > emacs
comparison lispref/display.texi @ 72208:513c469ffd50
(Face Functions): Fix explanations of FRAME=t or nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 31 Jul 2006 18:32:16 +0000 |
parents | c9a89b23ca0f |
children | 871eeda78fd7 858cb33ae39d |
comparison
equal
deleted
inserted
replaced
72207:e9f448b5a616 | 72208:513c469ffd50 |
---|---|
2046 @end defun | 2046 @end defun |
2047 | 2047 |
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 |
2052 functions. If you specify @var{frame}, they affect just that frame; | 2052 attributes of an existing face. |
2053 otherwise, they affect all frames as well as the defaults that apply to | |
2054 new frames. | |
2055 | 2053 |
2056 @defun set-face-attribute face frame &rest arguments | 2054 @defun set-face-attribute face frame &rest arguments |
2057 This function sets one or more attributes of face @var{face} for frame | 2055 This function sets one or more attributes of face @var{face} for frame |
2058 @var{frame}. The attributes you specify this way override whatever | 2056 @var{frame}. The attributes you specify this way override whatever |
2059 the @code{defface} says. | 2057 the @code{defface} says. |
2072 | 2070 |
2073 @noindent | 2071 @noindent |
2074 sets the attributes @code{:width}, @code{:weight} and @code{:underline} | 2072 sets the attributes @code{:width}, @code{:weight} and @code{:underline} |
2075 to the corresponding values. | 2073 to the corresponding values. |
2076 | 2074 |
2077 If @var{frame} is @code{t}, this function sets the attributes for all | 2075 If @var{frame} is @code{t}, this function sets the default attributes |
2078 existing frames, and sets defaults that will apply for new frames. | 2076 for new frames. Default attribute values specified this way override |
2079 Default attribute values specified this way override the | 2077 the @code{defface} for newly created frames. |
2080 @code{defface} for newly created frames. | 2078 |
2079 If @var{frame} is @code{nil}, this function sets the attributes for | |
2080 all existing frames, and the default for new frames. | |
2081 @end defun | 2081 @end defun |
2082 | 2082 |
2083 @defun face-attribute face attribute &optional frame inherit | 2083 @defun face-attribute face attribute &optional frame inherit |
2084 This returns the value of the @var{attribute} attribute of face | 2084 This returns the value of the @var{attribute} attribute of face |
2085 @var{face} on @var{frame}. If @var{frame} is @code{nil}, | 2085 @var{face} on @var{frame}. If @var{frame} is @code{nil}, |
2140 @end defun | 2140 @end defun |
2141 | 2141 |
2142 The functions above did not exist before Emacs 21. For compatibility | 2142 The functions above did not exist before Emacs 21. For compatibility |
2143 with older Emacs versions, you can use the following functions to set | 2143 with older Emacs versions, you can use the following functions to set |
2144 and examine the face attributes which existed in those versions. | 2144 and examine the face attributes which existed in those versions. |
2145 They use values of @code{t} and @code{nil} for @var{frame} | |
2146 just like @code{set-face-attribute} and @code{face-attribute}. | |
2145 | 2147 |
2146 @defun set-face-foreground face color &optional frame | 2148 @defun set-face-foreground face color &optional frame |
2147 @defunx set-face-background face color &optional frame | 2149 @defunx set-face-background face color &optional frame |
2148 These functions set the foreground (or background, respectively) color | 2150 These functions set the foreground (or background, respectively) color |
2149 of face @var{face} to @var{color}. The argument @var{color} should be a | 2151 of face @var{face} to @var{color}. The argument @var{color} should be a |
2196 This function swaps the foreground and background colors of face | 2198 This function swaps the foreground and background colors of face |
2197 @var{face}. | 2199 @var{face}. |
2198 @end defun | 2200 @end defun |
2199 | 2201 |
2200 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 |
2201 specify @var{frame}, they refer to the default data for new frames. | 2203 specify @var{frame}, they refer to the selected frame; @code{t} refers |
2202 They return the symbol @code{unspecified} if the face doesn't define any | 2204 to the default data for new frames. They return the symbol |
2203 value for that attribute. | 2205 @code{unspecified} if the face doesn't define any value for that |
2206 attribute. | |
2204 | 2207 |
2205 @defun face-foreground face &optional frame inherit | 2208 @defun face-foreground face &optional frame inherit |
2206 @defunx face-background face &optional frame inherit | 2209 @defunx face-background face &optional frame inherit |
2207 These functions return the foreground color (or background color, | 2210 These functions return the foreground color (or background color, |
2208 respectively) of face @var{face}, as a string. | 2211 respectively) of face @var{face}, as a string. |