all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steve Yegge <stevey@google.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: supporting mouse-entered, mouse-left
Date: Fri, 31 Jul 2009 08:48:30 -0700	[thread overview]
Message-ID: <9c768dc60907310848k73ea7284g91ebdc15cd35ae60@mail.gmail.com> (raw)
In-Reply-To: <0C3F67DE39BD414B9E7D825BA8D1F3F4@us.oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

On Fri, Jul 31, 2009 at 8:38 AM, Drew Adams <drew.adams@oracle.com> wrote:

>        I would like to highlight certain identifiers (such as all uses
>        of a particular local variable in a function) simultaneously
>        when the mouse enters any of them.
>
>        I've scoured the documentation, and I don't see a way to
>        accomplish this feat.
>
>        Would it be reasonable to add mouse-entered and mouse-left
>        properties analogous to point-entered and point-left?
>
>        Alternately (or in addition), it might be nice to have text
>        properties analogous to the mouseenter, mouseleave and
>        possibly mouseover standard browser events, which would
>        fire at the granularity of pixels rather than characters.
>
> Maybe I'm misunderstanding, but if you mean highlight the text whenever the
> mouse is over it, you can do that using text property `mouse-face'. (That
> has
> character granularity however.)
>
> To have the mouseover highlight appear for certain words etc., you would
> need to
> apply property `mouse-face' to those words.
>
> AFAIK, font-lock cannot be used for this, since it always uses the `face'
> text
> property. (But maybe I'm wrong about that.) It might be an interesting
> feature
> for font-lock to let you specify a different text property to use.
>
>
I'm sorry if I was unclear.  Let me give an example.  In this sentence:

"One flew east, one flew west, and one flew over the cuckoo's nest."

I would like to arrange things in advance so that whenever the mouse is
over any instance of the word "flew", ALL of the instances highlight.

`mouse-face' is not powerful enough to accomplish this.

-steve

[-- Attachment #2: Type: text/html, Size: 2237 bytes --]

  reply	other threads:[~2009-07-31 15:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31  7:13 supporting mouse-entered, mouse-left Steve Yegge
2009-07-31 15:38 ` Drew Adams
2009-07-31 15:48   ` Steve Yegge [this message]
2009-07-31 16:48   ` Stephen J. Turnbull
2009-07-31 16:42     ` Drew Adams
2009-07-31 20:23       ` Drew Adams
2009-07-31 20:57         ` Steve Yegge
2009-08-01  0:56           ` Drew Adams
2009-08-01  5:52             ` Steve Yegge
2009-08-01  7:26               ` Drew Adams
2009-08-01  4:07           ` Stephen J. Turnbull
2009-08-01  6:04             ` Steve Yegge
2009-08-01  7:18               ` Stephen J. Turnbull
2009-07-31 19:16 ` Stefan Monnier
2009-07-31 22:05   ` Johan Bockgård

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=9c768dc60907310848k73ea7284g91ebdc15cd35ae60@mail.gmail.com \
    --to=stevey@google.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.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.