GNU bug report logs - #4911
mouse-face property should merge face attributes, not replace

Previous Next

Package: emacs;

Reported by: Dave Aspinall <daveaspin <at> googlemail.com>

Date: Thu, 12 Nov 2009 12:55:04 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dave Aspinall <daveaspin <at> googlemail.com>
Cc: 4911 <at> debbugs.gnu.org
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Tue, 01 Oct 2019 16:08:02 +0200
Dave Aspinall <daveaspin <at> 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




This bug report was last modified 5 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.