aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2012-06-09 14:26:46 +0800
committerChong Yidong2012-06-09 14:26:46 +0800
commit6175e34b61bb75d18a91d4774c629fb6fb28ab32 (patch)
tree44bc444b4c83999b3b12dae4b52b816aba3d3318 /doc
parentd9857e534be786674818645a1c51410b4ca68cf8 (diff)
downloademacs-6175e34b61bb75d18a91d4774c629fb6fb28ab32.tar.gz
emacs-6175e34b61bb75d18a91d4774c629fb6fb28ab32.zip
Doc improvements for face remapping.
* face-remap.el (face-remap-add-relative, face-remap-set-base) (buffer-face-set, buffer-face-toggle, buffer-face-mode-invoke): Doc fixes. * doc/lispref/display.texi (Face Remapping): Minor clarification. * doc/lispref/text.texi (Special Properties): Clarify the meaning of a list of faces in the `face' property. Fixes: debbugs:11225
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/display.texi37
-rw-r--r--doc/lispref/text.texi6
3 files changed, 28 insertions, 22 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 3c9f26d6a24..cbe081ca6b4 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12012-06-09 Chong Yidong <cyd@gnu.org>
2
3 * text.texi (Special Properties): Clarify the meaning of a list of
4 faces in the `face' property.
5
6 * display.texi (Face Remapping): Minor clarification.
7
12012-06-08 Chong Yidong <cyd@gnu.org> 82012-06-08 Chong Yidong <cyd@gnu.org>
2 9
3 * display.texi (Face Attributes): Font family does not accept 10 * display.texi (Face Attributes): Font family does not accept
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 53e800bfbf0..3725b6fd820 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2511,39 +2511,34 @@ Scale,,, emacs, The GNU Emacs Manual}).
2511The value of this variable is an alist whose elements have the form 2511The value of this variable is an alist whose elements have the form
2512@code{(@var{face} . @var{remapping})}. This causes Emacs to display 2512@code{(@var{face} . @var{remapping})}. This causes Emacs to display
2513any text having the face @var{face} with @var{remapping}, rather than 2513any text having the face @var{face} with @var{remapping}, rather than
2514the ordinary definition of @var{face}. @var{remapping} may be any 2514the ordinary definition of @var{face}.
2515face specification suitable for a @code{face} text property: either a 2515
2516face name, or a property list of attribute/value pairs, or a list in 2516@var{remapping} may be any face specification suitable for a
2517which each element is either a face name or a property list 2517@code{face} text property: either a face (i.e.@: a face name or a
2518(@pxref{Special Properties}). 2518property list of attribute/value pairs), or a list of faces. For
2519details, see the description of the @code{face} text property in
2520@ref{Special Properties}. @var{remapping} serves as the complete
2521specification for the remapped face---it replaces the normal
2522definition of @var{face}, instead of modifying it.
2519 2523
2520If @code{face-remapping-alist} is buffer-local, its local value takes 2524If @code{face-remapping-alist} is buffer-local, its local value takes
2521effect only within that buffer. 2525effect only within that buffer.
2522 2526
2523Two points bear emphasizing: 2527Note: face remapping is non-recursive. If @var{remapping} references
2524 2528the same face name @var{face}, either directly or via the
2525@enumerate 2529@code{:inherit} attribute of some other face in @var{remapping}, that
2526@item 2530reference uses the normal definition of @var{face}. For instance, if
2527@var{remapping} serves as the complete specification for the remapped 2531the @code{mode-line} face is remapped using this entry in
2528face---it replaces the normal definition of @var{face}, instead of 2532@code{face-remapping-alist}:
2529modifying it.
2530
2531@item
2532If @var{remapping} references the same face name @var{face}, either
2533directly or via the @code{:inherit} attribute of some other face in
2534@var{remapping}, that reference uses the normal definition of
2535@var{face}. In other words, the remapping cannot be recursive.
2536 2533
2537For instance, if the @code{mode-line} face is remapped using this
2538entry in @code{face-remapping-alist}:
2539@example 2534@example
2540(mode-line italic mode-line) 2535(mode-line italic mode-line)
2541@end example 2536@end example
2537
2542@noindent 2538@noindent
2543then the new definition of the @code{mode-line} face inherits from the 2539then the new definition of the @code{mode-line} face inherits from the
2544@code{italic} face, and the @emph{normal} (non-remapped) definition of 2540@code{italic} face, and the @emph{normal} (non-remapped) definition of
2545@code{mode-line} face. 2541@code{mode-line} face.
2546@end enumerate
2547@end defvar 2542@end defvar
2548 2543
2549 The following functions implement a higher-level interface to 2544 The following functions implement a higher-level interface to
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index e2bdc707c5b..63a6d2cbab3 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3004,7 +3004,11 @@ time you want to specify a particular attribute for certain text.
3004@xref{Face Attributes}. 3004@xref{Face Attributes}.
3005 3005
3006@item 3006@item
3007A list, where each element uses one of the two forms listed above. 3007A list of faces. This specifies a face which is an aggregate of the
3008attributes of each of the listed faces. Faces occurring earlier in
3009the list have higher priority. Each list element must have one of the
3010two above forms (i.e.@: either a face name or a property list of face
3011attributes).
3008@end itemize 3012@end itemize
3009 3013
3010Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by 3014Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by