[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No syntax highlighting in python mode
From: |
Lowell Gilbert |
Subject: |
Re: No syntax highlighting in python mode |
Date: |
Wed, 08 Dec 2010 15:07:44 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) |
Tim Johnson <tim@johnsons-web.com> writes:
> On 2010-05-10, Tim Johnson <tim@johnsons-web.com> wrote:
>> I'm using GNU Emacs 23.1.1 on Slackware linux 13.0 32-bit.
>> Syntax highlighting does not work. The only thing highlighted are
>> strings. Not even function definitions.
>>
>> I've tried add-hook with
>> (setq font-lock-maximum-decoration
>> '((python-mode . 3)))
>>
>> I've started emacs with a python file and --debug-init
>> with no messages that suggest any type of error.
>>
>> c-h, v font-lock-maximum-decoration gives me
>> [no match]
>>
>> Any suggestions would be appreciated. Other programming
>> modes work fine. Other python mode functions appear to
>> work as expected.
> Hmm! See
> http://www.emacswiki.org/emacs/PythonMode
> where is says:
> """
> Emacs post version 21 has its own python mode (python.el). This is
> enabled by default for .py files so you don?t have to add anything to
> your InitFile to use it.
> """
> I believe the statement above is incorrect. I had to use the
> require form - I.E. (require 'python) to activate the syntax
> highlighting.
I can't reproduce that. In fact:
emacs -q /usr/share/yum-cli/yumcommands.py
gives me python-mode *with* syntax color.
[Also on 23.1.1]