Next: Display Margins, Previous: Pixel Specification, Up: Display Property
Here are the other sorts of display specifications that you can use
in the display text property.
Recursive display specifications are not supported—string's
display properties, if any, are not used.
(image . image-props)(slice x y width height)image specifies a slice
(a partial area) of the image to display. The elements y and
x specify the top left corner of the slice, within the image;
width and height specify the width and height of the
slice. Integers are numbers of pixels. A floating-point number
in the range 0.0–1.0 stands for that fraction of the width or height
of the entire image.
((margin nil) string)(left-fringe bitmap [face])(right-fringe bitmap [face])(space-width factor)(height height)(+ n)(- n)height bound to the current specified font height.
(raise factor)The factor must be a number, which is interpreted as a multiple of the height of the affected text. If it is positive, that means to display the characters raised. If it is negative, that means to display them lower down.
Note that if the text also has a height display specification,
which was specified before (i.e. to the left of) raise, the
latter will affect the amount of raising or lowering in pixels,
because that is based on the height of the text being raised.
Therefore, if you want to display a sub- or superscript that is
smaller than the normal text height, consider specifying raise
before height.
You can make any display specification conditional. To do that,
package it in another list of the form
(when condition . spec).
Then the specification spec applies only when
condition evaluates to a non-nil value. During the
evaluation, object is bound to the string or buffer having the
conditional display property. position and
buffer-position are bound to the position within object
and the buffer position where the display property was found,
respectively. Both positions can be different when object is a
string.
Note that condition will only be evaluated when redisplay examines the text where this display spec is located, so this feature is best suited for conditions that are relatively stable, i.e. yield, for each particular buffer position, the same results on every evaluation. If the results change for the same text location, e.g., if the result depends on the position of point, then the conditional specification might not do what you want, because redisplay examines only those parts of buffer text where it has reasons to assume that something changed since the last display cycle.