all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joaotavora@gmail.com (João Távora)
To: Yuta Yamada <sleepboy.zzz@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: new flymake: cosmetic problem on terminal emacs
Date: Sun, 22 Oct 2017 23:29:48 +0100	[thread overview]
Message-ID: <87po9e3jfn.fsf@gmail.com> (raw)
In-Reply-To: <CAK=dAsNi=JZ1NkQVVSHMMk-EYW=3sQhnLX6OT3fQ=pLnTkPbhA@mail.gmail.com> (Yuta Yamada's message of "Sat, 21 Oct 2017 07:42:52 -0700")

Yuta Yamada <sleepboy.zzz@gmail.com> writes:

> In terminal Emacs, I found not highlight state of flymake even there is a warning.
> It can be visible if you set underline to the flymake's face.

Since Flymake can now highlight arbitrary regions, some of those regions
can be mere whitespace, which is the case with the
elisp-flymake-checkdoc backend.

The offending code is this (repeated in flymake-warning and flymake-note)

   (defface flymake-error
     '((((supports :underline (:style wave)))
        :underline (:style wave :color "Red1"))
       (t
        :inherit error))
     "Face used for marking error regions."
     :version "24.4")

Clearly your terminal doesn't support the first clause, and the second
one is unsuitable for whitespace.

The simplest thing I can think of that keeps some of the "genericness"
of the last clause is adding ":inverse-video t" to it. If noone can
think of anything better, I will push this patch in some days' time. I
tried it and it looks reasonably OK.

João

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 9c546fd966..7738d608e9 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -281,6 +281,7 @@ flymake-error
   '((((supports :underline (:style wave)))
      :underline (:style wave :color "Red1"))
     (t
+     :inverse-video t
      :inherit error))
   "Face used for marking error regions."
   :version "24.4")
@@ -289,6 +290,7 @@ flymake-warning
   '((((supports :underline (:style wave)))
      :underline (:style wave :color "deep sky blue"))
     (t
+     :inverse-video t
      :inherit warning))
   "Face used for marking warning regions."
   :version "24.4")
@@ -297,6 +299,7 @@ flymake-note
   '((((supports :underline (:style wave)))
      :underline (:style wave :color "yellow green"))
     (t
+     :inverse-video t
      :inherit warning))
   "Face used for marking note regions."
   :version "26.1")






  reply	other threads:[~2017-10-22 22:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-21 14:42 new flymake: cosmetic problem on terminal emacs Yuta Yamada
2017-10-22 22:29 ` João Távora [this message]
2017-10-23 12:49   ` Stefan Monnier
2017-10-24 10:55   ` Yuta Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po9e3jfn.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=sleepboy.zzz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.