unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 25906@debbugs.gnu.org, ynyaaa@gmail.com, npostavs@users.sourceforge.net
Subject: bug#25906: 25.1; strange behavior of overlapped mouse-face
Date: Fri, 03 Mar 2017 20:29:21 +0200	[thread overview]
Message-ID: <83r32ekyda.fsf@gnu.org> (raw)
In-Reply-To: <vr37eu9ri2.fsf@fencepost.gnu.org> (message from Glenn Morris on Fri, 03 Mar 2017 12:53:09 -0500)

> From: Glenn Morris <rgm@gnu.org>
> Cc: npostavs@users.sourceforge.net,  25906@debbugs.gnu.org,  ynyaaa@gmail.com
> Date: Fri, 03 Mar 2017 12:53:09 -0500
> 
> Eli Zaretskii wrote:
> 
> >> I expect expect the appearance of the display when the cursor is at some
> >> point (BBB) to not depend on how it got there.
> >
> > I agree.  This should already happen after my recent changes.
> 
> Yes, that happens now, but not in the way I was naively expecting.

That's why I asked.

> Now it seems that overlay ol-2 always wins. Maybe this is correct, I
> don't know.

It is correct, because only one overlay should be used for displaying
mouse-face, and the code selects the overlay of the highest priority.
Since the recipe didn't define any priority for the overlays, Emacs,
somewhat arbitrarily, chooses the second one.

> I think from the original report, the OP might expect both underline
> and overline when the cursor is on BBB

That would be the wrong thing to do, IMO.  The mouse-face is not just
any face, it is designed for showing an "active region" of text, where
mouse gestures produce certain effects.  Such region is also customary
has a help-echo defined to show the appropriate tooltip.  It therefore
makes no sense to merge mouse-face definitions that come from several
different sources, because there could be only one action that will
happen upon those mouse gestures, and mixing several help-echo texts
makes no sense either.  So Emacs shows only one mouse-face of several
possible ones.





  reply	other threads:[~2017-03-03 18:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  3:44 bug#25906: 25.1; strange behavior of overlapped mouse-face ynyaaa
2017-03-01 17:05 ` Eli Zaretskii
2017-03-01 23:35   ` Glenn Morris
2017-03-01 23:37   ` npostavs
2017-03-02 15:05     ` Eli Zaretskii
2017-03-02 20:42       ` Glenn Morris
2017-03-03  7:51         ` Eli Zaretskii
2017-03-03 17:53           ` Glenn Morris
2017-03-03 18:29             ` Eli Zaretskii [this message]
2017-03-03 18:36               ` Glenn Morris
2017-03-11 12:28                 ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83r32ekyda.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25906@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    --cc=rgm@gnu.org \
    --cc=ynyaaa@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).