Go to the first, previous, next, last section, table of contents.


Properties with Special Meanings

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
If a character has a 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
You can use the property face to control the font and color of text. Its value is a face name or a list of face names. See section Faces, for more information. If the property value is a list, elements may also have the form (foreground-color . color-name) or (background-color . color-name). These elements specify just the foreground color or just the background color; therefore, there is no need to create a face for each color that you want to use. See section Font Lock Mode, for information on how to update face properties automatically based on the contents of the text.
mouse-face
The 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.
local-map
You can specify a different keymap for some of the text in a buffer by means of the 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 Active Keymaps.
syntax-table
The syntax-table property overrides what the syntax table says about this particular character. See section Syntax Properties.
read-only
If a character has the property read-only, then modifying that character is not allowed. Any command that would do so gets an error. 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 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 Read-Only Buffers.
invisible
A non-nil invisible property can make a character invisible on the screen. See section Invisible Text, for details.
intangible
If 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. When the variable inhibit-point-motion-hooks is non-nil, the intangible property is ignored.
modification-hooks
If 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.
insert-in-front-hooks
insert-behind-hooks
The 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 section Change Hooks, for other hooks that are called when you change text in a buffer.
point-entered
point-left
The 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: 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.

Variable: inhibit-point-motion-hooks
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.


Go to the first, previous, next, last section, table of contents.