bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#33740: [PATCH] Customizable flymake mode-line indicator


From: Lars Ingebrigtsen
Subject: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Thu, 19 Sep 2019 17:28:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I did something as radical as actually reading the doc string to
> mode-line-format, and doing this
>
> (put 'my-format 'risky-local-variable t)
>
> makes this work as expected.  Then I guess I can proceed with the
> original flymake feature implementation.

But... no.

As a test case, go to any .el file in Emacs and say `M-x flymake-mode',
and you'll get a lighter in the minor modes in the mode lines saying
something like " Flymake[0 3 17]" or whatever.

Then try this:

(setq flymake--mode-line-format (concat (propertize " bar " 'face 'bold) "foo"))

Both "bar" and "foo" will be bold in the mode line.

(setq flymake--mode-line-format (concat "foo" (propertize " bar " 'face 'bold)))

Neither "foo" nor "bar" will be bold.

So it seems like whatever is computing the mode line is somehow copying
the faces from the first character in the lighter string and applies
them to the entire lighter?  Very confusing.

This does not happen outside of the minor modes in the mode line (i.e.,
if I add an element outside of the minor modes, text properties are not
overwritten this way).

-- 
(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]