GNU bug report logs - #33740
[PATCH] Customizable flymake mode-line indicator

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Fri, 14 Dec 2018 09:21:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 33740 <at> debbugs.gnu.org
Subject: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Fri, 04 Jan 2019 20:27:57 +0000
Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:

> Hi,
>
> I would like to hide Flymake label in mode line leaving just counters.
>
> Customizable mode line indicator like in this patch can solve my issue
> and can help to those wanting to keep their mode line cleaner.
>
>
> diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
> index 7b100da..477abdd 100644
> --- a/lisp/progmodes/flymake.el
> +++ b/lisp/progmodes/flymake.el
> @@ -220,6 +220,10 @@ Specifically, start it when the saved buffer is actually displayed."
>    :version "26.1"
>    :type 'boolean)
>
> +(defcustom flymake-mode-line-indicator "Flymake"
> +  "Mode label in mode-line."
> +  :type 'string)
> +
> (when (fboundp 'define-fringe-bitmap)
>    (define-fringe-bitmap 'flymake-double-exclamation-mark
>      (vector #b00000000
> @@ -1152,7 +1156,7 @@ default) no filter is applied."
>                                        diags-by-type)))
>                       (flymake--backend-state-diags state)))
>               flymake--backend-state)
> -    `((:propertize " Flymake"
> +    `((:propertize ,(format " %s" flymake-mode-line-indicator)
>                     mouse-face mode-line-highlight
>                     help-echo
>                     ,(concat (format "%s known backends\n" (length known))

Looks good, though I would prefer if the defcustom was a format-string
where %s would be substituted by the error counts.  That way you could
even get rid of the braces or use something else.

João




This bug report was last modified 4 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.