[Top][All Lists]

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

Re: Last steps for pretesting (font-lock-extend-region-function)

From: Stefan Monnier
Subject: Re: Last steps for pretesting (font-lock-extend-region-function)
Date: Tue, 25 Apr 2006 12:09:40 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> Surely not - that variable is essentially buffer local, and it makes no
>> sense for it not to be so.  To remove the make-variable-buffer-local call
>> could lead to the same problems which have bedevilled paragraph-start and
>> paragraph-separate.

> It's a variable which should be modified via `add-hook' (which has
> a parameter to specify whether it should be applied buffer-locally or not),
> not via setq.  So there is need for make-variable-buffer-local.

> Especially since it does make sense to add stuff to it globally as well:
> Think about someone who wants to re-add the font-lock-extra-lines feature.
> Similarly the font-lock-multiline property could be handled by moving the
> code from font-lock-default-fontify-region to this hook.

Hmmm...  sorry 'bout that: I was assuming changing it a list of functions,
but indeed it's not necessarily a good idea.

Still: even if it's a simple variable, you shouldn't set it via `setq' but
via font-lock-defaults (which will use make-local-variable for you), so
there's still no justification for make-variable-buffer-local.


reply via email to

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