bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32143: 27.0.50; Wombat theme breaks syntax highlighting when a regio


From: Eli Zaretskii
Subject: bug#32143: 27.0.50; Wombat theme breaks syntax highlighting when a region is selected
Date: Fri, 20 Jul 2018 12:14:53 +0300

> From: Emre Sevinç <emre.sevinc@gmail.com>
> Date: Fri, 13 Jul 2018 09:55:47 +0200
> 
> The theme `wombat` breaks syntax highlighting when transient-mark-mode
> is enabled, and a region is selected.
> 
> Normally, without any theme loaded, a selected region shows proper
> syntax highlighting as can be seen at:
> 
>   https://imgur.com/a/INLjbqh
> 
> And when you load the theme wombat, it also shows proper syntax
> highlighting when no region is selected:
> 
>   https://imgur.com/a/ULTClxl
> 
> But when you select a region after loading wombat theme, the syntax
> highlighting is broken:
> 
>   https://imgur.com/a/dWfKakB
> 
> I think the reason is caused by Line 39 of wombat-theme.el:
> 
>   `(region ((,class (:background "#444444" :foreground "#f6f3e8"))))
> 
> because when I remove the ":foreground" from it:
> 
>   `(region ((,class (:background "#444444"))))
> 
> I can have proper syntax highlighting again in selected regions:
> 
>   https://imgur.com/a/9hSChSH

I think if this theme wants a distinct foreground for the region, it
will always override font-lock faces, because the region highlight is
implemented via overlays, and overlays always "win" faces specified as
text properties.

Stefan, do you have any clever ideas for how to keep the foreground of
'region' without overriding the font-lock specified foreground?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]