From b825131041e2c9294ca662125ea6b70ba9242a8e Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 28 Dec 2020 02:18:16 +0100 Subject: [PATCH] Document the text property limitations in mode lines * doc/lispref/modes.texi (Properties in Mode, Mode Line Basics): Mention the special text property limitations. --- doc/lispref/modes.texi | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 98aa94e90d4..675aeec8a5f 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1982,9 +1982,15 @@ variables without prompting the user.) @item (@var{string} @var{rest}@dots{}) @itemx (@var{list} @var{rest}@dots{}) -A list whose first element is a string or list means to process all the -elements recursively and concatenate the results. This is the most -common form of mode line construct. +A list whose first element is a string or list means to process all +the elements recursively and concatenate the results. This is the +most common form of mode line construct. (Note that text properties +are handled specially (for reasons of efficiency) when displaying +strings in the mode line: Only the text property on the first +character of the string are considered, and they are then used over +the entire string. If you need a string with different text +properties, you have to use the special @code{:propertize} mode line +construct.) @item (:eval @var{form}) A list whose first element is the symbol @code{:eval} says to evaluate @@ -2439,7 +2445,7 @@ line: @enumerate @item Put a string with a text property directly into the mode line data -structure. +structure, but see @ref{Mode Line Data} for caveats for that. @item Put a text property on a mode line %-construct such as @samp{%12b}; then -- 2.39.5