Reputation: 1561
How can we configure (or fix?) hl-line so that its background highlight goes last (or first?) in the stack.
That is: if hl-line highlights one line where some words are already having a background color, hl-line should NOT override that background color with its own.
It should go in the back, letting other background colors to be visible.
Upvotes: 3
Views: 208
Reputation: 30699
If you use library hl-line+.el
(see also highlight current line) then you can set the priority of the overlay used by hl-line. To do what you want, you can reduce the number below that used by other overlays.
(You can even use a negative number, but that is undocumented -- see Emacs bug #16192. And you can use a cons cell with a main priority and a secondary priority -- see bug #17234.)
However, overlay highlighting always takes priority over text-property highlighting. So you cannot make an overlay appear to be "under" some text-property highlighting.
Upvotes: 1