emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Face text property for `minor-mode-alist` item.


From: Lars Ingebrigtsen
Subject: Re: Face text property for `minor-mode-alist` item.
Date: Sun, 27 Dec 2020 23:09:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Narendra Joshi <narendraj9@gmail.com> writes:

> Is this a bug in Emacs or is this expected behaviour?

It's expected (but possibly under-documented?) behaviour -- the mode
line code tries to be super-efficient, and doesn't allow text to have
different text properties.  As you've discovered, it only uses the text
property from the first character, and uses that over the entire text
fragment.

You have to use the special (:propertize ...) mode line constructs (and
chop up the text) to get more fine-grained text properties in the mode
line.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]