unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Robin.Fairey@gmail.com
To: help-gnu-emacs@gnu.org
Subject: Context sensitive code highlighting.
Date: Tue, 8 Apr 2008 02:51:39 -0700 (PDT)	[thread overview]
Message-ID: <e718bfc4-e2c8-470e-a8bf-dde9990af7c0@a9g2000prl.googlegroups.com> (raw)

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?


             reply	other threads:[~2008-04-08  9:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-08  9:51 Robin.Fairey [this message]
2008-04-08 13:24 ` Context sensitive code highlighting Tassilo Horn
2008-04-08 14:17   ` Lennart Borgman (gmail)
2008-04-09 22:53 ` Eric M. Ludlam

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=e718bfc4-e2c8-470e-a8bf-dde9990af7c0@a9g2000prl.googlegroups.com \
    --to=robin.fairey@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).