aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters2002-06-08 20:31:13 +0000
committerColin Walters2002-06-08 20:31:13 +0000
commit1f63f8141f593bd57508b107d7240f4d82f85000 (patch)
tree8d5b8bc654550147ddcc6beca8d0b84f8b48ef58
parent651f7556c173ddc553bb1bcfa8730ad221674e47 (diff)
downloademacs-1f63f8141f593bd57508b107d7240f4d82f85000.tar.gz
emacs-1f63f8141f593bd57508b107d7240f4d82f85000.zip
(char-property-alias-alist): New variable; describe its relation to
`default-text-properties' and the `category' property. (default-text-properties): Note `char-property-alias-alist'. (Special Properties): Document new property `font-lock-face'.
-rw-r--r--lispref/text.texi36
1 files changed, 31 insertions, 5 deletions
diff --git a/lispref/text.texi b/lispref/text.texi
index d5760a73d89..bbbbb6eca82 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -2318,6 +2318,15 @@ string, only text properties are considered, since strings never have
2318overlays. 2318overlays.
2319@end defun 2319@end defun
2320 2320
2321@defvar char-property-alias-alist
2322This variable holds an alist which maps property names to a list of
2323alternative property names. If a character does not specify a direct
2324value for a property, the alternative property names are consulted in
2325order; the first non-nil value is used. This variable takes
2326precedence over @code{default-text-properties}, and @code{category}
2327properties take precedence over this variable.
2328@end defvar
2329
2321@defun text-properties-at position &optional object 2330@defun text-properties-at position &optional object
2322This function returns the entire property list of the character at 2331This function returns the entire property list of the character at
2323@var{position} in the string or buffer @var{object}. If @var{object} is 2332@var{position} in the string or buffer @var{object}. If @var{object} is
@@ -2327,11 +2336,13 @@ This function returns the entire property list of the character at
2327@defvar default-text-properties 2336@defvar default-text-properties
2328This variable holds a property list giving default values for text 2337This variable holds a property list giving default values for text
2329properties. Whenever a character does not specify a value for a 2338properties. Whenever a character does not specify a value for a
2330property, neither directly nor through a category symbol, the value 2339property, neither directly, through a category symbol, or through
2331stored in this list is used instead. Here is an example: 2340@code{char-property-alias-alist}, the value stored in this list is
2341used instead. Here is an example:
2332 2342
2333@example 2343@example
2334(setq default-text-properties '(foo 69)) 2344(setq default-text-properties '(foo 69)
2345 char-property-alias-alist nil)
2335;; @r{Make sure character 1 has no properties of its own.} 2346;; @r{Make sure character 1 has no properties of its own.}
2336(set-text-properties 1 2 nil) 2347(set-text-properties 1 2 nil)
2337;; @r{What we get, when we ask, is the default value.} 2348;; @r{What we get, when we ask, is the default value.}
@@ -2653,8 +2664,23 @@ just the foreground color or just the background color.
2653@code{(:foreground @var{color-name})}, and likewise for the background. 2664@code{(:foreground @var{color-name})}, and likewise for the background.
2654@end itemize 2665@end itemize
2655 2666
2656@xref{Font Lock Mode}, for information on how to update @code{face} 2667You can use Font Lock Mode (@pxref{Font Lock Mode}), to dynamically
2657properties automatically based on the contents of the text. 2668update @code{face} properties based on the contents of the text.
2669
2670@item font-lock-face
2671@kindex font-lock-face @r{(text property)}
2672The @code{font-lock-face} property is the same in all respects as the
2673@code{face} property, but its state of activation is controlled by
2674@code{font-lock-mode}. This can be advantageous for special buffers
2675which are not intended to be user-editable, or for static areas of
2676text which are always fontified in the same way.
2677@xref{Precalculated Fontification}.
2678
2679Strictly speaking, @code{font-lock-face} is not a built-in text
2680property; rather, it is implemented in Font Lock mode using
2681@code{char-property-alias-alist}. @xref{Examining Properties}.
2682
2683This property is new in Emacs 21.4.
2658 2684
2659@item mouse-face 2685@item mouse-face
2660@kindex mouse-face @r{(text property)} 2686@kindex mouse-face @r{(text property)}