[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Best way to detect font-lock mode is on?
From: |
Ilya Zakharevich |
Subject: |
Re: Best way to detect font-lock mode is on? |
Date: |
Fri, 14 Jan 2011 01:35:00 +0000 (UTC) |
User-agent: |
slrn/0.9.8.1pl1 (Linux) |
On 2011-01-13, Tim X <timx@nospam.dev.null> wrote:
>>> As you can see, I'm using font-lock-defaults to test whether font-lock
>>> is enabled.
>>
>> No matter what is the test, your logic is not enough. In cperl-mode,
>> I pepper all such functions with
>> (cperl-update-fontification pos)
>> (sp?) so that lazy-locking is not playing time-sensitive tricks with
>> your logic.
>>
>
> Thanks. Will have to give it some thought. The functions I showed above
> are not used to control font-locking - in fact, I'm using them to
> determine indentation information. The mode is derived from another mode
> that takescare of the font locking side of things. If I assume that mode
> has taken care of the font-lock issues, I expect the above would be
> sufficient.
Irrelevant.
AFAIU, you think that the logic of delegation
your mode --> some-other-mode --> text-property(font)-ification
is somehow sufficient to free you from caring about time-related
issues. Wrong. Given that WHATEVER-ication would usually (or often?)
run in a time-delayed hook can't be ignored.
Hope this helps,
Ilya
- Re: Best way to detect font-lock mode is on?, (continued)
Re: Best way to detect font-lock mode is on?, Ilya Zakharevich, 2011/01/11