[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cannot activate font-lock-mode
From: |
martin rudalics |
Subject: |
Re: cannot activate font-lock-mode |
Date: |
Sat, 02 Jun 2007 10:58:58 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
>>>>>mode: font-lock
>>>>>font-lock-defaults: (("^\\S-.*:$"))
>>>>
>>>>I must say that I don't know why this has changed.
>>>>Does the patch below fix your problem?
>>
>>>No, nothing changed. If I use font-lock-keywords I get the message:
>>> "Toggling font-lock-mode off; better pass an explicit argument."
>>
>>That looks correct: since font-lock is now enabled by default your "mode:
>>font-lock" might very well end up turning the mode OFF, and this is what the
>>message tells you.
>
>
> Nonetheless, the behaviour does not change. Either with your patch:
> - (font-lock-eval-keywords keywords))
> + (font-lock-eval-keywords (or keywords font-lock-keywords)))
>
> or without, the behaviour is the same. Specifically:
>
> - if I remove the "mode: font-lock" line from the local variables, no
> fontification is done
> - else, if "mode: font-lock" is there:
> + if I use font-lock-keywords I get the above message
> + if I use font-lock-defaults I get fontification and no messages
Why didn't you try the very first solution I proposed? You have to
activate font-lock-mode _after_ setting the defaults, like this
# Local Variables:
# font-lock-defaults: (("^\\s-*:0" "##+"))
# mode: font-lock
# End: