emacs-devel
[Top][All Lists]
Advanced

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

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


From: Alan Mackenzie
Subject: Re: Last steps for pretesting (font-lock-extend-region-function)
Date: Tue, 25 Apr 2006 21:52:01 +0000 (GMT)

Hi, Stefan!

On Tue, 25 Apr 2006, Stefan Monnier wrote:

>>> 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.

I don't think XEmacs has got this mechanism yet, so portable code will be
carrying on using `setq' for some time.

>        Stefan

-- 
Alan.






reply via email to

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