all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <clement.pitclaudel@gmail.com>
Cc: larsi@gnus.org, 4911@debbugs.gnu.org
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Sun, 26 Apr 2020 16:34:11 +0300	[thread overview]
Message-ID: <83blne74mk.fsf@gnu.org> (raw)
In-Reply-To: <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com> (message from Clément Pit-Claudel on Sat, 25 Apr 2020 23:10:42 -0400)

> From: Clément Pit-Claudel <clement.pitclaudel@gmail.com>
> Date: Sat, 25 Apr 2020 23:10:42 -0400
> Cc: Lars Ingebrigtsen <larsi@gnus.org>
> 
> > Maybe Eli meant something like what I suggested above:
> > adding an underline without changing the foreground
> > and background colors of the text.  Yes, that could
> > be done by face merging (and yes, currently the normal
> > fontification gets obliterated).
> 
> I think that would be great.  Maybe I misunderstood: I thought Eli was suggesting a workaround that worked with Emacs as it is (which would explain why Lars closed the bug), but indeed currently using an underline still removes other face properties.

No, this cannot be done with the current display code, and I'm sorry I
posted a confusing suggestion.

If someone wants to work on an option whereby we will merge the mouse
face with the face of each highlighted character, that would be
welcome.  I just want to warn volunteers that providing such a feature
is not going to be simple: the way mouse-highlight is currently
implemented we simply redraw a stretch of glyphs on the screen with a
face that is already "realized" and cached (see xfaces.c).  Which
means face merging has been already done, and we can only use the
existing faces which were merged long ago.  Making this new feature
happen would then require reimplementing mouse-highlight similar to
the region (some kind of overlay), and I hope the result will not
cause annoying flicker, since in principle we will have to trigger
redisplay on each mouse move, unlike a much simpler redraw we do now.





  reply	other threads:[~2020-04-26 13:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 12:41 bug#4911: mouse-face property should merge face attributes, not replace Dave Aspinall
2019-10-01 14:08 ` Lars Ingebrigtsen
2019-10-01 14:36   ` Basil L. Contovounesios
2019-10-01 15:00   ` Eli Zaretskii
2019-10-01 15:14     ` Lars Ingebrigtsen
2019-10-01 16:46   ` Drew Adams
2020-04-10 16:26 ` Clément Pit-Claudel
2020-04-25 21:22   ` Clément Pit-Claudel
2020-04-25 22:13     ` Drew Adams
2020-04-26  3:10       ` Clément Pit-Claudel
2020-04-26 13:34         ` Eli Zaretskii [this message]
2020-05-04 15:16           ` Clément Pit-Claudel
2020-05-08 14:39             ` Eli Zaretskii
2020-05-08 15:01               ` Clément Pit-Claudel
2020-05-08 15:20                 ` Eli Zaretskii
2020-05-08 15:58                   ` Clément Pit-Claudel
2020-04-26 17:22         ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83blne74mk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=4911@debbugs.gnu.org \
    --cc=clement.pitclaudel@gmail.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.