From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robin.Fairey@gmail.com Newsgroups: gmane.emacs.help Subject: Context sensitive code highlighting. Date: Tue, 8 Apr 2008 02:51:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207659268 23028 80.91.229.12 (8 Apr 2008 12:54:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2008 12:54:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 08 14:55:01 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JjDLo-0000bh-Sp for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Apr 2008 14:55:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjDLB-0006eQ-MJ for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Apr 2008 08:54:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!a9g2000prl.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 10 Original-NNTP-Posting-Host: 212.240.156.238 Original-X-Trace: posting.google.com 1207648299 28916 127.0.0.1 (8 Apr 2008 09:51:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 8 Apr 2008 09:51:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a9g2000prl.googlegroups.com; posting-host=212.240.156.238; posting-account=e5SYGAoAAAC8P5D_ObBo7wjmGA6VTbly User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13,gzip(gfe),gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:157793 X-Mailman-Approved-At: Tue, 08 Apr 2008 08:51:49 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53166 Archived-At: 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. This requires adding new keywords to the highlighter on the fly, determined by content in the file itself instead of in a keyword list at the beginning of the process. I've tweaked some other syntax highlighting modes, but I've no idea where to start with this one. I'm not looking for a full solution, just a pointer to where to start looking, or something I can read and modify to my needs?