I highlight current line by evaluating:
(hl-line-mode)
It could also be set globally:
(global-hl-line-mode nil)
The problem is that this way line highlighting overrides highlight-phrase. So my question is: “how to highlight both current line and a given phrase in this line?”
Both
highlight-phraseandhl-lineapply faces that have a background color set.hl-linewins because it uses an overlay, and overlays always override text properties, whichhighlight-phraseuses. I suggest that you work around this by customizing thehi-yellowface to use a bright foreground color instead of a background color, or even a box.