unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Steve Yegge'" <stevey@google.com>, <emacs-devel@gnu.org>
Subject: RE: supporting mouse-entered, mouse-left
Date: Fri, 31 Jul 2009 08:38:15 -0700	[thread overview]
Message-ID: <0C3F67DE39BD414B9E7D825BA8D1F3F4@us.oracle.com> (raw)
In-Reply-To: <9c768dc60907310013o7226f1d5w4cde4c54b03eb474@mail.gmail.com>

	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	other threads:[~2009-07-31 15:38 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 [this message]
2009-07-31 15:48   ` Steve Yegge
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

  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=0C3F67DE39BD414B9E7D825BA8D1F3F4@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=stevey@google.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).