diff options
| author | Chong Yidong | 2012-06-09 14:26:46 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-06-09 14:26:46 +0800 |
| commit | 6175e34b61bb75d18a91d4774c629fb6fb28ab32 (patch) | |
| tree | 44bc444b4c83999b3b12dae4b52b816aba3d3318 /doc | |
| parent | d9857e534be786674818645a1c51410b4ca68cf8 (diff) | |
| download | emacs-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/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 37 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 6 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-06-08 Chong Yidong <cyd@gnu.org> | 8 | 2012-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}). | |||
| 2511 | The value of this variable is an alist whose elements have the form | 2511 | The 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 |
| 2513 | any text having the face @var{face} with @var{remapping}, rather than | 2513 | any text having the face @var{face} with @var{remapping}, rather than |
| 2514 | the ordinary definition of @var{face}. @var{remapping} may be any | 2514 | the ordinary definition of @var{face}. |
| 2515 | face specification suitable for a @code{face} text property: either a | 2515 | |
| 2516 | face name, or a property list of attribute/value pairs, or a list in | 2516 | @var{remapping} may be any face specification suitable for a |
| 2517 | which 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}). | 2518 | property list of attribute/value pairs), or a list of faces. For |
| 2519 | details, see the description of the @code{face} text property in | ||
| 2520 | @ref{Special Properties}. @var{remapping} serves as the complete | ||
| 2521 | specification for the remapped face---it replaces the normal | ||
| 2522 | definition of @var{face}, instead of modifying it. | ||
| 2519 | 2523 | ||
| 2520 | If @code{face-remapping-alist} is buffer-local, its local value takes | 2524 | If @code{face-remapping-alist} is buffer-local, its local value takes |
| 2521 | effect only within that buffer. | 2525 | effect only within that buffer. |
| 2522 | 2526 | ||
| 2523 | Two points bear emphasizing: | 2527 | Note: face remapping is non-recursive. If @var{remapping} references |
| 2524 | 2528 | the 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 | 2530 | reference uses the normal definition of @var{face}. For instance, if |
| 2527 | @var{remapping} serves as the complete specification for the remapped | 2531 | the @code{mode-line} face is remapped using this entry in |
| 2528 | face---it replaces the normal definition of @var{face}, instead of | 2532 | @code{face-remapping-alist}: |
| 2529 | modifying it. | ||
| 2530 | |||
| 2531 | @item | ||
| 2532 | If @var{remapping} references the same face name @var{face}, either | ||
| 2533 | directly 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 | ||
| 2537 | For instance, if the @code{mode-line} face is remapped using this | ||
| 2538 | entry 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 |
| 2543 | then the new definition of the @code{mode-line} face inherits from the | 2539 | then 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 |
| 3007 | A list, where each element uses one of the two forms listed above. | 3007 | A list of faces. This specifies a face which is an aggregate of the |
| 3008 | attributes of each of the listed faces. Faces occurring earlier in | ||
| 3009 | the list have higher priority. Each list element must have one of the | ||
| 3010 | two above forms (i.e.@: either a face name or a property list of face | ||
| 3011 | attributes). | ||
| 3008 | @end itemize | 3012 | @end itemize |
| 3009 | 3013 | ||
| 3010 | Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by | 3014 | Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by |