[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: supporting mouse-entered, mouse-left

From: Steve Yegge
Subject: Re: supporting mouse-entered, mouse-left
Date: Fri, 31 Jul 2009 13:57:58 -0700

On Fri, Jul 31, 2009 at 1:23 PM, Drew Adams <address@hidden> wrote:
FWIW, you can use command `hlt-highlight-regexp-region' with a prefix arg to put
`mouse-face' on all regexp matches (in the region or buffer). It can use either
overlays or text properties. The command is here:

What's still missing for the requested feature is the ability to show _all_
`mouse-face' text whenever you mouse-over any such text.

Thanks, but I'm not looking for a one-off command to run, and
regular expressions are not sufficient for my needs here.

This is intended to be a feature of js2-mode, which I checked in
to the repository a few days ago.  It is a major mode for editing
_javascript_ code.  It generates a full parse tree for the buffer, so
it knows exactly where all local variables and function parameters
are declared and referenced.

The mode decorates the source with various text properties to
facilitate navigation, outlining, folding, etc.  My goal is to link
together all the references to each local variable, so they light
up when you mouse over any of them.

I can't use track-mouse, or at least I don't think I can, since this
feature needs to trigger automatically as you move the mouse
(from the idle loop).

If there were a way to be notified that the mouse has started
moving, then I could use track-mouse, albeit with a huge pile of
code.  But it would likely be much less work to implement this in
C and offer a higher-level interface at the lisp level.

I'll take a look at implementing it when I get some time.  I just
wanted to vet the idea with the list to make sure I wouldn't be
wasting my time.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]