On Fri, Jul 31, 2009 at 9:07 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
Steve Yegge writes:Are you being imprecise here? Surely you have already done this
> 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,
"linking" for other reasons?
Ie, the only problem you are asking about here is to get the motion
> so they light up when you mouse over any of them.
event, and run a hook on that?
*sigh*
> I can't use track-mouse,
Well, even if track-mouse doesn't do exactly what you want, it's not
> 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).
clear to me that it's unusable. I can think of two interfaces that
might serve:
(1) a minor mode where a click toggles the highlighting corresponding
to the js2-mode text properties at the point of the click (no
motion tracking needed), and
(2) a minor mode which is activated by a click (or popup menu
selection), after which you can explicitly use track-mouse until
the next non-motion event or something like that. I don't think
this kind of mouse-tracking would require huge amounts of code for
what you've described, although there are few enough mouse clicks
that you may already be using them all.
I think you do want some kind of activation, otherwise if any mouse
motion enables the effect we'd have to coin a term "apoplectic fruit
salad".
If you want to test the "any motion" interface now, XEmacs has
`mode-motion-hook'