[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [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.
category
category
property, we call it the
category of the character. It should be a symbol. The properties
of the symbol serve as defaults for the properties of the character.
face
face
to control the font and color of
text. See section 38.11 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.
(foreground-color . color-name)
is equivalent to
(:foreground color-name)
, and likewise for the background.
See section 23.5 Font Lock Mode, for information on how to update face
properties automatically based on the contents of the text.
mouse-face
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.
fontified
nil
, says that text in the buffer has
had faces assigned automatically by a feature such as Font-Lock mode.
See section 38.11.8 Automatic Face Assignment.
display
display
Property.
help-echo
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.
If the value of the help-echo
property is a function, that
function is called with three arguments, window, object and
position 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 position
argument is as follows:
help-echo
text property was found.
help-echo
property, and pos is the position in the overlay's buffer under
the mouse.
display
property), pos is the position in that
string under the mouse.
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
(see Help display).
This feature is used in the mode line and for other active text. It is available starting in Emacs 21.
local-map
local-map
property. The property's value for the
character after point, if non-nil
, is used for key lookup instead
of the buffer's local map. If the property value is a symbol, the
symbol's function definition is used as the keymap. See section 22.6 Active Keymaps.
keymap
keymap
property is similar to local-map
but overrides the
buffer's local map (and the map specified by the local-map
property) rather than replacing it.
syntax-table
syntax-table
property overrides what the syntax table says
about this particular character. See section 35.4 Syntax Properties.
read-only
read-only
, then modifying that
character is not allowed. Any command that would do so gets an error,
text-read-only
.
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. See section 32.19.6 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. See section 27.7 Read-Only Buffers.
invisible
nil
invisible
property can make a character invisible
on the screen. See section 38.5 Invisible Text, for details.
intangible
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.
When the variable inhibit-point-motion-hooks
is non-nil
,
the intangible
property is ignored.
field
field
property constitute a
field. Some motion functions including forward-word
and
beginning-of-line
stop moving at a field boundary.
See section 32.19.10 Defining and Using Fields.
modification-hooks
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.
insert-in-front-hooks
insert-behind-hooks
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 32.25 Change Hooks, for other hooks that are called when you change text in a buffer.
point-entered
point-left
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 using char-after
to examine characters at various
positions without moving point to those positions. Only an actual
change in the value of point runs these hook functions.
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
.
nil
, it specifies a
function called to display help strings. These may be help-echo
properties, menu help strings (see section 22.12.1.1 Simple Menu Items,
see section 22.12.1.2 Extended Menu Items), or tool bar help strings (see section 22.12.6 Tool bars). The specified function is called with one argument, the help
string to display. Tooltip mode (see section `Tooltips' in The GNU Emacs Manual) provides an example.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |