diff options
author | Richard M. Stallman <rms@gnu.org> | 2007-09-19 15:04:50 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2007-09-19 15:04:50 +0000 |
commit | 9600ac7c86905175deb5794a8fec218b3d14250f (patch) | |
tree | 0d436a0a3805abb70c16a5a1399a7c265c82a353 /lispref | |
parent | 14b4fdfb2133be58fdb8dc88a8f97aac24a9486d (diff) | |
download | emacs-9600ac7c86905175deb5794a8fec218b3d14250f.tar.gz |
(Display Property): Clarify when multiple display specs work in
parallel and when one overrides. Fix error in example.
Diffstat (limited to 'lispref')
-rw-r--r-- | lispref/ChangeLog | 2 | ||||
-rw-r--r-- | lispref/display.texi | 23 |
2 files changed, 16 insertions, 9 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b1eb12699fc..fdc2957892e 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,6 +1,8 @@ 2007-09-19 Richard Stallman <rms@gnu.org> * display.texi (Display Property): Explain multiple display specs. + Clarify when they work in parallel and when one overrides. + Fix error in example. 2007-08-30 Martin Rudalics <rudalics@gmx.at> diff --git a/lispref/display.texi b/lispref/display.texi index f1b3b155223..0aa5a976399 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -3237,15 +3237,20 @@ to use the value specified by the frame. insert images into text, and also control other aspects of how text displays. The value of the @code{display} property should be a display specification, or a list or vector containing several display -specifications (which apply in parallel to the text they cover). +specifications. Display specifications generally apply in parallel to +the text they cover. - Some kinds of @code{display} properties specify something to display -instead of the text that has the property. In this case, ``the text'' -means all the consecutive characters that have the same Lisp object as -their @code{display} property; these characters are replaced as a -single unit. By contrast, characters that have similar but distinct -Lisp objects as their @code{display} properties are handled -separately. Here's a function that illustrates this point: + Some kinds of @code{display} specifications specify something to +display instead of the text that has the property. If a list of +display specifications includes more than one of this kind, the first +is effective and the rest are ignored. + + For these specifications, ``the text that has the property'' means +all the consecutive characters that have the same Lisp object as their +@code{display} property; these characters are replaced as a single +unit. By contrast, characters that have similar but distinct Lisp +objects as their @code{display} properties are handled separately. +Here's a function that illustrates this point: @smallexample (defun foo () @@ -3273,7 +3278,7 @@ results: (goto-char (point-min)) (dotimes (i 5) (let ((string (concat "A"))) - (put-text-property (point) (2+ (point)) 'display string) + (put-text-property (point) (+ 2 (point)) 'display string) (put-text-property (point) (1+ (point)) 'display string) (forward-char 2)))) @end smallexample |