[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Difference between Font-Lock and Overlays
From: |
Nikolaj Schumacher |
Subject: |
Re: Difference between Font-Lock and Overlays |
Date: |
Fri, 10 Oct 2008 17:50:54 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) |
Nordlöw <per.nordlow@gmail.com> wrote:
> When should I use font-lock-add-keywords() and when should I use
> overlays to realize syntax highlighting?
I'd say, if what you're highlighting syntax, and the syntax is simple
enough, use font-lock.
If you're highlighting something temporarily or dynamically, use
overlays.
Otherwise, you can also directly set the text's properties as you're
parsing.
regards,
Nikolaj Schumacher