[Top][All Lists]

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

[Help-gnu-emacs] Re: <url>

From: Kevin Rodgers
Subject: [Help-gnu-emacs] Re: <url>
Date: Wed, 20 Sep 2000 15:44:52 -0600 (MDT)

Bruce Ingalls <address@hidden> wrote:
> Kevin Rodgers <address@hidden> writes:
> > Does this work?
> > 
> > ;;; Local Variables: ***
> > ;;; eval: (require 'browse-url) ***
> > ;;; End: ***
> Thanks, but no.
> I noticed that browse-url-at-point() kind of does what I need, but I
> am looking for the function that Gnus and others use, which hilites
> urls, as the mouse passes over, and you can middle mouse click them.

I don't know anything about Gnus, but this almost does what you want
using just browse-url -- except that it only highlights the URLs after
they've been clicked on:

;;; Local Variables: ***
;;; eval: (require 'browse-url) ***
;;; eval: (global-set-key [S-mouse-2] 'browse-url-at-mouse) ***
;;; eval: (defadvice browse-url-url-at-point (after highlight activate) (if 
ad-return-value (let ((url-overlay (make-overlay (match-beginning 0) (match-end 
0)))) (overlay-put url-overlay 'mouse-face 'highlight)))) ***
;;; End: ***

I guess the advice should check whether the URL already has an overlay
before creating one, though...

Kevin Rodgers <address@hidden>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             1 303 397 2807[voice]

reply via email to

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