[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4911: mouse-face property should merge face attributes, not replace
From: |
Lars Ingebrigtsen |
Subject: |
bug#4911: mouse-face property should merge face attributes, not replace |
Date: |
Tue, 01 Oct 2019 16:08:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Dave Aspinall <daveaspin@googlemail.com> writes:
> Perhaps this has been noted already: the low-level behaviour of the
> mouse-face property seems ugly: it simply overwrites the face property
> for characters under the mouse. For example in Info, blue underlined
> links turn black without the underline when the mouse is hovered over
> them to give the green background from the highlight face. This feels
> unnatural.
>
> In Proof General (http://proofgeneral.inf.ed.ac.uk) we use the
> mouse-face property on programming language text which is heavily
> decorated with font-lock. Users complain that when the mouse is over
> a region the normal fontification is obliterated.
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?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#4911: mouse-face property should merge face attributes, not replace,
Lars Ingebrigtsen <=