[Top][All Lists]

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

Re: overlays?

From: Stefan
Subject: Re: overlays?
Date: Wed, 19 Mar 2014 08:29:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> So an overlay could possibly be better for "the first five lines of the
>> buffer" than font-lock.

This makes no sense: You can't oppose "font-lock" and "overlays",
really, because they are by nature different beasts.

`font-lock' is a library that puts "things" on some parts of the buffer
to change their appearance (color, font, size, ...).  hi-lock is another
library that does the same, tho it is meant to be used differently (the
rules specifying what-to-put-where are typically specified interactively
in hi-lock whereas they are typically specified once and for all by the
major-mode author for font-lock, so they can be more complex).

Emacs offers to kinds of "things" that can be used for that purpose:
text-properties and overlays.  These *are* comparable (e.g. font-lock
uses text-properties, but it could use overlays instead).


reply via email to

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