[Top][All Lists]

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

RE: supporting mouse-entered, mouse-left

From: Drew Adams
Subject: RE: supporting mouse-entered, mouse-left
Date: Fri, 31 Jul 2009 08:38:15 -0700

        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.

reply via email to

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