emacs-devel
[Top][All Lists]
Advanced

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

Re: Is there something like `on-display-functions'?


From: Stefan Monnier
Subject: Re: Is there something like `on-display-functions'?
Date: Wed, 27 Jan 2010 16:04:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

>> and over which part of the buffer, since that property
>> should only be applied to the part of the buffer that's fontified by
>> all the functions (if the first functions fontifies 256 chars at a
>> time and the second 1000 chars at a time, the property should only
>> be set on the first 256 bytes).

> Sorry, I still don't get this: why do you need several functions that
> fontify different stretches of text,

Presumably if you have several functions on fontification-functions,
it's because you need several functions that "fontify" the same text
(e.g. font-lock on the one hand and Alan's hypothetical code on the other).

> and why only the first stretch should be marked as fontified.

Unless the two functions cooperate, there's no reason to presume that
the two functions will fontify the same amount of text, since the amount
is mostly arbitrarily chosen by the function themselves (and may need
rounding up because of line-granularity or other
foo-region-extend-function).

So if each function is written independently, it will (in general) not
fontify the same amount of text as the others, and it won't know how
much the others (if any) have fontified.  So none of the functions will
actually know on which portion of the text the `fontified' property
should be applied.


        Stefan




reply via email to

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