|
From: | Lennart Borgman (gmail) |
Subject: | Re: Context sensitive code highlighting. |
Date: | Tue, 08 Apr 2008 16:17:06 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Tassilo Horn wrote:
Robin.Fairey@gmail.com writes:How hard would it be to implement context sensitive font lock behaviour? I'm thinking of something that scans the code for an argument list and then highlights subsequent occurences of the argument names in a new colour.
See (info "(elisp) Search-based Fontification")You can use a function instead of a regexp for searching for things to highlight. So it is possible to do what you want. You just need to do some book-keeping.
Have a look at highlight-symbol.el [1], especially `highlight-symbol-mode'. Bye, Tassilo __________ [1] http://www.emacswiki.org/cgi-bin/emacs-en/HighlightSymbol http://nschum.de/src/emacs/highlight-symbol/
It is very good, but would look much better if a background overlay could be used instead in hi-lock.
[Prev in Thread] | Current Thread | [Next in Thread] |