unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44689: 28.0.50; Use appropriate face for Flymake unknown backend
@ 2020-11-16 17:17 Protesilaos Stavrou
  2020-11-16 22:20 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Protesilaos Stavrou @ 2020-11-16 17:17 UTC (permalink / raw)
  To: 44689

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-appropriate-face-for-Flymake-unknown-backend.patch --]
[-- Type: text/x-patch, Size: 1146 bytes --]

From 78fc4caba2ee0f3f81afe7b3167b07f9df5be137 Mon Sep 17 00:00:00 2001
From: Protesilaos Stavrou <info@protesilaos.com>
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


[-- Attachment #3: flymake-unknown-backend-after.png --]
[-- Type: image/png, Size: 197971 bytes --]

[-- Attachment #4: flymake-unknown-backend-before.png --]
[-- Type: image/png, Size: 196942 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-24  5:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 17:17 bug#44689: 28.0.50; Use appropriate face for Flymake unknown backend Protesilaos Stavrou
2020-11-16 22:20 ` Lars Ingebrigtsen
2020-11-17  5:38   ` Protesilaos Stavrou
2020-11-17  9:20     ` João Távora
2020-11-17  9:47       ` Protesilaos Stavrou
2020-11-17 16:30         ` João Távora
2020-11-18  5:58           ` Protesilaos Stavrou
2020-11-18  8:29             ` João Távora
2020-11-24  5:23               ` Lars Ingebrigtsen
2020-11-24  5:18       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).