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

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

Re: hl-line mode -- visual effect


From: Eli Zaretskii
Subject: Re: hl-line mode -- visual effect
Date: Wed, 10 Aug 2022 21:10:35 +0300

> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Wed, 10 Aug 2022 19:51:29 +0200
> 
> Until now, I have customized the "hl-line" font to set a background
> color, slightly more saturated than the background of the "default"
> font.
> 
> This approach has worked reasonably well for me for quite some time.
> But it's not perfect: I have buffers (eg. "*Diff*" buffer)
> where the background color of each line conveys valuable semantic
> information (added line, removed line, ...), and thus, in those
> buffers,
> my current approach doesn't work well, because the background color of
> the selected line is fixed (i.e. _overrides_ the _original_ background
> color of the line).
> 
> So, I'd like to highlight the selected line in a more subtle way: I'd
> like the selected line to slightly alter[1] the _original_ background
> color.
> 
> Does Emacs currently provide a reasonably simple way to achieve this?

No, at least not in the way you put it.  When Emacs merges two colors
each of which has the same attribute (in this case, background color)
defined, only one of them "wins".

What you could do is highlight the line using face attributes other
than fore-/background colors.  But you already know that.



reply via email to

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