From 43d1d1b5cd04e58724629cdcec529528d8018411 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 Jul 2024 14:56:14 +0300 Subject: [PATCH] ; Improve documentation of 'line-prefix' and 'wrap-prefix'. * doc/lispref/text.texi (Special Properties): Spell out more accurately how 'line-prefix' and 'wrap-prefix' properties should be set. (cherry picked from commit 87389f9ff9069f8e3b11ea0ff2e55619763c2231) --- doc/lispref/text.texi | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 626f39f3cd6..460d3df6f0c 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -3857,13 +3857,19 @@ controls the total height of the display line ending in that newline. @xref{Line Height}. @item wrap-prefix -If text has a @code{wrap-prefix} property, the prefix it defines will -be added at display time to the beginning of every continuation line -due to text wrapping (so if lines are truncated, the wrap-prefix is -never used). It may be a string or an image (@pxref{Other Display -Specs}), or a stretch of whitespace such as specified by the -@code{:width} or @code{:align-to} display properties (@pxref{Specified -Space}). +If a region of text has a @code{wrap-prefix} property, the prefix it +defines will be added at display time to the beginning of every +continuation line due to text wrapping (so if lines are truncated, the +wrap-prefix is never used). The property value may be a string or an +image (@pxref{Other Display Specs}), or a stretch of whitespace such as +specified by the @code{:width} or @code{:align-to} display properties +(@pxref{Specified Space}). Note that to have its effect, the +@code{wrap-prefix} property must be set on the entire region of text, +starting from the first character of the first line of that text and up +to the last character of the last line; otherwise, breaking the text +into lines in a different way might fail to display the prefix, because +the display engine checks for this property only immediately after +continuing a line. A wrap-prefix may also be specified for an entire buffer using the @code{wrap-prefix} buffer-local variable (however, a @@ -3871,12 +3877,18 @@ A wrap-prefix may also be specified for an entire buffer using the the @code{wrap-prefix} variable). @xref{Truncation}. @item line-prefix -If text has a @code{line-prefix} property, the prefix it defines will -be added at display time to the beginning of every non-continuation -line. It may be a string or an image (@pxref{Other Display -Specs}), or a stretch of whitespace such as specified by the -@code{:width} or @code{:align-to} display properties (@pxref{Specified -Space}). +If a region of text has a @code{line-prefix} property, the prefix it +defines will be added at display time to the beginning of every +non-continuation line. The property value may be a string or an image +(@pxref{Other Display Specs}), or a stretch of whitespace such as +specified by the @code{:width} or @code{:align-to} display properties +(@pxref{Specified Space}). Note that to have its effect, the +@code{line-prefix} property must be set on the entire region of text, +starting from the first character of the first line of that text and up +to the last character of the last line; otherwise, breaking the text +into lines in a different way might fail to display the prefix, because +the display engine checks for this property only when starting a new +line. A line-prefix may also be specified for an entire buffer using the @code{line-prefix} buffer-local variable (however, a -- 2.39.5