Subject: 28.0.50; Use appropriate face for Flymake unknown backend

From: Protesilaos Stavrou <[email-masked]>
Date: Mon, 16 Nov 2020 19:17:18 +0200

When Flymake has not yet checked the backend of a visited file it
displays a question mark on the mode line next to its lighter text.
This "?" indicator is fontified with the 'mode-line' face, which means
that it inherits properties such as ':box', ':background', and
potentially others.

The attached patch changes fontification to 'mode-line-emphasis', which
is a face that is specifically designed for drawing attention to such
indicators.

This allows users/themes to maintain a consistent presentation for their
mode lines, regardless of whether they are active or not.

The attached screenshots show the before and after states with all
themes disabled.  Focus on the inactive mode line at the middle of the
screen.

If maintainers think that this change does not provide sufficient
emphasis, I would suggest we look into updating the specifications of
'mode-line-emphasis' instead of using an inappropriate face for
individual indicators.

What do you think?

Best regards,
Protesilaos

-- 
Protesilaos Stavrou
protesilaos.com
>From 78fc4caba2ee0f3f81afe7b3167b07f9df5be137 Mon Sep 17 00:00:00 2001
From: Protesilaos Stavrou <[email-masked]>
Date: Mon, 16 Nov 2020 18:57:13 +0200
Subject: [PATCH] Use appropriate face for Flymake unknown backend

* lisp/progmodes/flymake.el (flymake--mode-line-format): Apply
'mode-line-emphasis' face which is better suited for indicators that
are placed on the mode line.
---
 lisp/progmodes/flymake.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index b286208fff..84f7c42eb2 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1224,7 +1224,7 @@ default) no filter is applied."
                       map))
       ,@(pcase-let ((`(,ind ,face ,explain)
                      (cond ((null known)
-                            '("?" mode-line "No known backends"))
+                            '("?" mode-line-emphasis "No known backends"))
                            (some-waiting
                             `("Wait" compilation-mode-line-run
                               ,(format "Waiting for %s running backend(s)"
-- 
2.29.2