| [ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Here is a table of text property names that have special built-in meanings. The following sections list a few additional special property names that control filling and property inheritance. All other names have no standard meaning, and you can use them as you like.
Note: the properties composition, display, invisible
and intangible can also cause point to move to an acceptable place,
after each Emacs command. Voir la section Adjusting Point After Commands.
categoryIf a character has a category property, we call it the property
category of the character. It should be a symbol. The properties of this
symbol serve as defaults for the properties of the character.
faceYou can use the property face to control the font and color of text.
Voir la section Faces, for more information.
In the simplest case, the value is a face name. It can also be a list; then each element can be any of these possibilities;
(foreground-color . color-name) or
(background-color . color-name). These elements specify just
the foreground color or just the background color. Voir la section Color Names, for
the supported forms of color-name.
A cons cell of (foreground-color . color-name) is equivalent to
specifying (:foreground color-name); likewise for the
background.
You can use Font Lock Mode (voir la section Font Lock Mode), to dynamically update
face properties based on the contents of the text.
font-lock-faceThe font-lock-face property is the same in all respects as the
face property, but its state of activation is controlled by
font-lock-mode. This can be advantageous for special buffers which
are not intended to be user-editable, or for static areas of text which are
always fontified in the same way. Voir la section Precalculated Fontification.
Strictly speaking, font-lock-face is not a built-in text property;
rather, it is implemented in Font Lock mode using
char-property-alias-alist. Voir la section Examining Text Properties.
This property is new in Emacs 22.1.
mouse-faceThe property mouse-face is used instead of face when the mouse
is on or near the character. For this purpose, “near” means that all text
between the character and where the mouse is have the same mouse-face
property value.
fontifiedThis property says whether the text is ready for display. If nil,
Emacs's redisplay routine calls the functions in
fontification-functions (voir la section Automatic Face Assignment) to prepare this part of
the buffer before it is displayed. It is used internally by the “just in
time” font locking code.
displayThis property activates various features that change the way text is
displayed. For example, it can make text appear taller or shorter, higher
or lower, wider or narrow, or replaced with an image. Voir la section The display Property.
help-echo
If text has a string as its help-echo property, then when you move
the mouse onto that text, Emacs displays that string in the echo area, or in
the tooltip window (voir (emacs)Tooltips section `Tooltips' dans The GNU Emacs Manual).
If the value of the help-echo property is a function, that function
is called with three arguments, window, object and pos and
should return a help string or nil for none. The first argument,
window is the window in which the help was found. The second,
object, is the buffer, overlay or string which had the
help-echo property. The pos argument is as follows:
help-echo property,
and pos is the position in the overlay's buffer.
display property), pos is the position in that string.
If the value of the help-echo property is neither a function nor a
string, it is evaluated to obtain a help string.
You can alter the way help text is displayed by setting the variable
show-help-function (voir Help display).
This feature is used in the mode line and for other active text.
keymapThe keymap property specifies an additional keymap for commands.
When this keymap applies, it is used for key lookup before the minor mode
keymaps and before the buffer's local map. Voir la section Active Keymaps. If the
property value is a symbol, the symbol's function definition is used as the
keymap.
The property's value for the character before point applies if it is
non-nil and rear-sticky, and the property's value for the character
after point applies if it is non-nil and front-sticky. (For mouse
clicks, the position of the click is used instead of the position of point.)
local-mapThis property works like keymap except that it specifies a keymap to
use instead of the buffer's local map. For most purposes (perhaps
all purposes), it is better to use the keymap property.
syntax-tableThe syntax-table property overrides what the syntax table says about
this particular character. Voir la section Syntax Properties.
read-onlyIf a character has the property read-only, then modifying that
character is not allowed. Any command that would do so gets an error,
text-read-only. If the property value is a string, that string is
used as the error message.
Insertion next to a read-only character is an error if inserting ordinary
text there would inherit the read-only property due to stickiness.
Thus, you can control permission to insert next to read-only text by
controlling the stickiness. Voir la section Stickiness of Text Properties.
Since changing properties counts as modifying the buffer, it is not possible
to remove a read-only property unless you know the special trick:
bind inhibit-read-only to a non-nil value and then remove the
property. Voir la section Read-Only Buffers.
invisibleA non-nil invisible property can make a character invisible on
the screen. Voir la section Invisible Text, for details.
intangibleIf a group of consecutive characters have equal and non-nil
intangible properties, then you cannot place point between them. If
you try to move point forward into the group, point actually moves to the
end of the group. If you try to move point backward into the group, point
actually moves to the start of the group.
If consecutive characters have unequal non-nil intangible
properties, they belong to separate groups; each group is separately treated
as described above.
When the variable inhibit-point-motion-hooks is non-nil, the
intangible property is ignored.
fieldConsecutive characters with the same field property constitute a
field. Some motion functions including forward-word and
beginning-of-line stop moving at a field boundary. Voir la section Defining and Using Fields.
cursorNormally, the cursor is displayed at the end of any overlay and text
property strings present at the current window position. You can place the
cursor on any desired character of these strings by giving that character a
non-nil cursor text property.
pointerThis specifies a specific pointer shape when the mouse pointer is over this text or image. Voir la section Pointer Shape, for possible pointer shapes.
line-spacingA newline can have a line-spacing text or overlay property that
controls the height of the display line ending with that newline. The
property value overrides the default frame line spacing and the buffer local
line-spacing variable. Voir la section Line Height.
line-heightA newline can have a line-height text or overlay property that
controls the total height of the display line ending in that newline.
Voir la section Line Height.
modification-hooksIf a character has the property modification-hooks, then its value
should be a list of functions; modifying that character calls all of those
functions. Each function receives two arguments: the beginning and end of
the part of the buffer being modified. Note that if a particular
modification hook function appears on several characters being modified by a
single primitive, you can't predict how many times the function will be
called.
If these functions modify the buffer, they should bind
inhibit-modification-hooks to t around doing so, to avoid
confusing the internal mechanism that calls these hooks.
Overlays also support the modification-hooks property, but the
details are somewhat different (voir la section Overlay Properties).
insert-in-front-hooksinsert-behind-hooksThe operation of inserting text in a buffer also calls the functions listed
in the insert-in-front-hooks property of the following character and
in the insert-behind-hooks property of the preceding character.
These functions receive two arguments, the beginning and end of the inserted
text. The functions are called after the actual insertion takes
place.
See also Change Hooks, for other hooks that are called when you change text in a buffer.
point-enteredpoint-leftThe special properties point-entered and point-left record
hook functions that report motion of point. Each time point moves, Emacs
compares these two property values:
point-left property of the character after the old location, and
point-entered property of the character after the new location.
If these two values differ, each of them is called (if not nil) with
two arguments: the old value of point, and the new one.
The same comparison is made for the characters before the old and new
locations. The result may be to execute two point-left functions
(which may be the same function) and/or two point-entered functions
(which may be the same function). In any case, all the point-left
functions are called first, followed by all the point-entered
functions.
It is possible with char-after to examine characters at various
buffer positions without moving point to those positions. Only an actual
change in the value of point runs these hook functions.
When this variable is non-nil, point-left and
point-entered hooks are not run, and the intangible property
has no effect. Do not set this variable globally; bind it with let.
If this variable is non-nil, it specifies a function called to
display help strings. These may be help-echo properties, menu help
strings (voir la section Simple Menu Items, voir la section Extended Menu Items), or tool
bar help strings (voir la section Tool bars). The specified function is called with
one argument, the help string to display. Tooltip mode (voir (emacs)Tooltips section `Tooltips' dans The GNU Emacs Manual) provides an example.
compositionThis text property is used to display a sequence of characters as a single glyph composed from components. For instance, in Thai a base consonant is composed with the following combining vowel as a single glyph. The value should be a character or a sequence (vector, list, or string) of integers.
| [ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.