Subject: Re: bug#4911: mouse-face property should merge face attributes, not replace

From: Eli Zaretskii <[email-masked]>
Date: Tue, 01 Oct 2019 18:00:13 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Tue, 01 Oct 2019 16:08:02 +0200
> Cc: [email-masked]
> 
> To reproduce:
> 
> (insert (propertize "hello" 'face 'underline 'mouse-face 'highlight))
> 
> and put the mouse pointer over the "hello": The underline goes away.
> 
> I think it might make sense to merge the properties...  but, on the
> other hand, this may make the text illegible.
> 
> For instance, this
> 
> (insert (propertize "hello" 'face '(:foreground "blue") 'mouse-face 'highlight))
> 
> would become a blank, blue box if the highlight face didn't define both a
> foreground colour.
> 
> So I'm not sure this would work.  Any opinions?

Emacs always worked like that: it selects either 'face' or
'mouse-face', according to what is appropriate, and never merges them.

I see no reason to change that now.  The use case described in the bug
report could be handled by using some non-color attribute for the
mouse-face, for example.