Subject: Re: bug#33567: Syntactic fontification of diff hunks

From: Dmitry Gutov <[email-masked]>
Date: Mon, 24 Dec 2018 04:29:39 +0200

On 21.12.2018 0:00, Juri Linkov wrote:

> I don't know.  We have two options for tty: highlight indicators only
> or use red/green foreground without syntax highlighting.

Ouch. All this time I've been talking about a personal customization 
that's too old for me to remember about. Sorry about that, I'm dropping 
that part of the proposal.

Speaking of ttys, green and red look foreground looks kind of okay for 
me in that context. However, diff-refine-* faces are simply defined as 
:inverse-video. And now, with the new feature, when e.g. there is a face 
that spans the whole line (like a comment), both diff-refine-added and 
diff-refine-removed faces look the same. Which is a problem. I don't 
have easy suggestions except defining specific background for them 
instead of inverse-video. And at that point we can drop the green/red 
foregrounds if people prefer.

> By default it used the black foreground.  Only Magit uses red/green foreground.

So I'd propose Magit to follow the core here. And, like we discussed, 
other popular tools.

> Maybe with conditional face definitions like
> 
> (if (boundp 'diff-font-lock-syntax)
>      (defface blabla))

Fair enough.