emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch: goto-address -vs- font-lock-mode


From: Tom Tromey
Subject: Re: Patch: goto-address -vs- font-lock-mode
Date: Wed, 04 Jul 2007 19:37:21 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux)

>>>>> "rms" == Richard Stallman <address@hidden> writes:

>     This patch adds a new minor mode that acts like `goto-address'.
>     Unlike goto-address, it uses font-lock to add properties to text in
>     the buffer.  This means that changes to the buffer which add URLs or
>     email address will automatically be detected.

rms> Would it be more appropriate to use overlays for this?
rms> You wouldn't want to copy those properties ever, and it is better
rms> if adding them does not modify the buffer.

rms> Is it feasible to use the font-lock mechanism to add overlays?

I don't know.  I don't really know that much about font-lock -- I just
used it since it was an easy way to get the effect I wanted.

I saw some code on the Emacs wiki that handles updating overlays in
response to modifications to the buffer.  Maybe this would be a good
candidate for inclusion in Emacs itself.  I can email you the code
and/or the author's contact info if that would help.

Also, Lennart told me off-list that there is some code in nXhtml to
handle some cases related to this.  I haven't looked at this code (or
the overlay updating code for that matter) yet.

Tom




reply via email to

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