diff options
| author | Richard M. Stallman | 2007-09-19 15:04:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-09-19 15:04:50 +0000 |
| commit | 9600ac7c86905175deb5794a8fec218b3d14250f (patch) | |
| tree | 0d436a0a3805abb70c16a5a1399a7c265c82a353 | |
| parent | 14b4fdfb2133be58fdb8dc88a8f97aac24a9486d (diff) | |
| download | emacs-9600ac7c86905175deb5794a8fec218b3d14250f.tar.gz emacs-9600ac7c86905175deb5794a8fec218b3d14250f.zip | |
(Display Property): Clarify when multiple display specs work in
parallel and when one overrides. Fix error in example.
| -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 @@ | |||
| 1 | 2007-09-19 Richard Stallman <rms@gnu.org> | 1 | 2007-09-19 Richard Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * display.texi (Display Property): Explain multiple display specs. | 3 | * display.texi (Display Property): Explain multiple display specs. |
| 4 | Clarify when they work in parallel and when one overrides. | ||
| 5 | Fix error in example. | ||
| 4 | 6 | ||
| 5 | 2007-08-30 Martin Rudalics <rudalics@gmx.at> | 7 | 2007-08-30 Martin Rudalics <rudalics@gmx.at> |
| 6 | 8 | ||
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. | |||
| 3237 | insert images into text, and also control other aspects of how text | 3237 | insert images into text, and also control other aspects of how text |
| 3238 | displays. The value of the @code{display} property should be a | 3238 | displays. The value of the @code{display} property should be a |
| 3239 | display specification, or a list or vector containing several display | 3239 | display specification, or a list or vector containing several display |
| 3240 | specifications (which apply in parallel to the text they cover). | 3240 | specifications. Display specifications generally apply in parallel to |
| 3241 | the text they cover. | ||
| 3241 | 3242 | ||
| 3242 | Some kinds of @code{display} properties specify something to display | 3243 | Some kinds of @code{display} specifications specify something to |
| 3243 | instead of the text that has the property. In this case, ``the text'' | 3244 | display instead of the text that has the property. If a list of |
| 3244 | means all the consecutive characters that have the same Lisp object as | 3245 | display specifications includes more than one of this kind, the first |
| 3245 | their @code{display} property; these characters are replaced as a | 3246 | is effective and the rest are ignored. |
| 3246 | single unit. By contrast, characters that have similar but distinct | 3247 | |
| 3247 | Lisp objects as their @code{display} properties are handled | 3248 | For these specifications, ``the text that has the property'' means |
| 3248 | separately. Here's a function that illustrates this point: | 3249 | all the consecutive characters that have the same Lisp object as their |
| 3250 | @code{display} property; these characters are replaced as a single | ||
| 3251 | unit. By contrast, characters that have similar but distinct Lisp | ||
| 3252 | objects as their @code{display} properties are handled separately. | ||
| 3253 | Here's a function that illustrates this point: | ||
| 3249 | 3254 | ||
| 3250 | @smallexample | 3255 | @smallexample |
| 3251 | (defun foo () | 3256 | (defun foo () |
| @@ -3273,7 +3278,7 @@ results: | |||
| 3273 | (goto-char (point-min)) | 3278 | (goto-char (point-min)) |
| 3274 | (dotimes (i 5) | 3279 | (dotimes (i 5) |
| 3275 | (let ((string (concat "A"))) | 3280 | (let ((string (concat "A"))) |
| 3276 | (put-text-property (point) (2+ (point)) 'display string) | 3281 | (put-text-property (point) (+ 2 (point)) 'display string) |
| 3277 | (put-text-property (point) (1+ (point)) 'display string) | 3282 | (put-text-property (point) (1+ (point)) 'display string) |
| 3278 | (forward-char 2)))) | 3283 | (forward-char 2)))) |
| 3279 | @end smallexample | 3284 | @end smallexample |