diff options
| author | Chong Yidong | 2013-04-06 15:39:48 +0800 |
|---|---|---|
| committer | Chong Yidong | 2013-04-06 15:39:48 +0800 |
| commit | cd542620197df6fefe2c2bebca1967ec84e8fa7c (patch) | |
| tree | 566cb415c07f5a61db53d079fae5027b1591a7f3 /doc/lispref/text.texi | |
| parent | 8ead390103b65c93977dd4dee419f66316a79b96 (diff) | |
| download | emacs-cd542620197df6fefe2c2bebca1967ec84e8fa7c.tar.gz emacs-cd542620197df6fefe2c2bebca1967ec84e8fa7c.zip | |
Improve Lisp manual documentation on setting faces.
* display.texi (Faces): Minor clarifications.
(Defining Faces): Clarify default vs custom face specs. Document
face-spec-set.
* display.texi (Overlay Properties):
* text.texi (Special Properties): Use the "anonymous face"
terminology. Describe foreground-color and background-color forms
as compatibility-only.
Diffstat (limited to 'doc/lispref/text.texi')
| -rw-r--r-- | doc/lispref/text.texi | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index c6cbfa5b3f8..6d5a39d887a 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -3008,27 +3008,31 @@ character. | |||
| 3008 | @item face | 3008 | @item face |
| 3009 | @cindex face codes of text | 3009 | @cindex face codes of text |
| 3010 | @kindex face @r{(text property)} | 3010 | @kindex face @r{(text property)} |
| 3011 | The @code{face} property controls the appearance of the character, | 3011 | The @code{face} property controls the appearance of the character |
| 3012 | such as its font and color. @xref{Faces}. The value of the property | 3012 | (@pxref{Faces}). The value of the property can be the following: |
| 3013 | can be the following: | ||
| 3014 | 3013 | ||
| 3015 | @itemize @bullet | 3014 | @itemize @bullet |
| 3016 | @item | 3015 | @item |
| 3017 | A face name (a symbol or string). | 3016 | A face name (a symbol or string). |
| 3018 | 3017 | ||
| 3019 | @item | 3018 | @item |
| 3020 | A property list of face attributes. This has the form (@var{keyword} | 3019 | An anonymous face: a property list of the form @code{(@var{keyword} |
| 3021 | @var{value} @dots{}), where each @var{keyword} is a face attribute | 3020 | @var{value} @dots{})}, where each @var{keyword} is a face attribute |
| 3022 | name and @var{value} is a meaningful value for that attribute. With | 3021 | name and @var{value} is a value for that attribute. |
| 3023 | this feature, you do not need to create a face each time you want to | ||
| 3024 | specify a particular attribute for certain text. | ||
| 3025 | 3022 | ||
| 3026 | @item | 3023 | @item |
| 3027 | A list of faces. This specifies a face which is an aggregate of the | 3024 | A list of faces. Each list element should be either a face name or an |
| 3025 | anonymous face. This specifies a face which is an aggregate of the | ||
| 3028 | attributes of each of the listed faces. Faces occurring earlier in | 3026 | attributes of each of the listed faces. Faces occurring earlier in |
| 3029 | the list have higher priority. Each list element must have one of the | 3027 | the list have higher priority. |
| 3030 | two above forms (i.e., either a face name or a property list of face | 3028 | |
| 3031 | attributes). | 3029 | @item |
| 3030 | A cons cell of the form @code{(foreground-color . @var{color-name})} | ||
| 3031 | or @code{(background-color . @var{color-name})}. This specifies the | ||
| 3032 | foreground or background color, similar to @code{(:foreground | ||
| 3033 | @var{color-name})} or @code{(:background @var{color-name})}. This | ||
| 3034 | form is supported for backward compatibility only, and should be | ||
| 3035 | avoided. | ||
| 3032 | @end itemize | 3036 | @end itemize |
| 3033 | 3037 | ||
| 3034 | Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by | 3038 | Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by |