all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* No syntax highlighting in python mode
@ 2010-05-10  1:42 Tim Johnson
  2010-05-10 18:42 ` Tim Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Johnson @ 2010-05-10  1:42 UTC (permalink / raw)
  To: help-gnu-emacs

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.

thanks

-- 
Tim 
tim@ johnsons-web.com||akwebsoft.com
http://www.akwebsoft.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No syntax highlighting in python mode
  2010-05-10  1:42 No syntax highlighting in python mode Tim Johnson
@ 2010-05-10 18:42 ` Tim Johnson
  2010-05-10 20:19   ` Lowell Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Johnson @ 2010-05-10 18:42 UTC (permalink / raw)
  To: help-gnu-emacs

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.
	cheers
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No syntax highlighting in python mode
  2010-05-10 18:42 ` Tim Johnson
@ 2010-05-10 20:19   ` Lowell Gilbert
  2010-05-11  0:42     ` Tim Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Lowell Gilbert @ 2010-05-10 20:19 UTC (permalink / raw)
  To: help-gnu-emacs

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]


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No syntax highlighting in python mode
  2010-05-10 20:19   ` Lowell Gilbert
@ 2010-05-11  0:42     ` Tim Johnson
  2010-05-11 14:35       ` Lowell Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Johnson @ 2010-05-11  0:42 UTC (permalink / raw)
  To: help-gnu-emacs

On 2010-05-10, Lowell Gilbert <lgusenet@be-well.ilk.org> wrote:
>>   Hmm! See
>> 	http://www.emacswiki.org/emacs/PythonMode
>> 	where it 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]

  Then I withdraw this statement:
>>   I believe the statement above is incorrect. I had to use the

  My problem may be from a side effect of something else in my .emacs
	or other configuration.

-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No syntax highlighting in python mode
  2010-05-11  0:42     ` Tim Johnson
@ 2010-05-11 14:35       ` Lowell Gilbert
  2010-05-12 15:42         ` Tim Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Lowell Gilbert @ 2010-05-11 14:35 UTC (permalink / raw)
  To: help-gnu-emacs

Tim Johnson <tim@johnsons-web.com> writes:

> On 2010-05-10, Lowell Gilbert <lgusenet@be-well.ilk.org> wrote:
>>>   Hmm! See
>>> 	http://www.emacswiki.org/emacs/PythonMode
>>> 	where it 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]
>
>   Then I withdraw this statement:
>>>   I believe the statement above is incorrect. I had to use the
>
>   My problem may be from a side effect of something else in my .emacs
> 	or other configuration.

It may be something not under your own control, however.
In particular, some OS distributions add their own local 
configurations to their emacs installations.

I recommend doing the same test I did.  If it has the same
problem you saw with your configuration, try the option
"--no-site-file" as well.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No syntax highlighting in python mode
  2010-05-11 14:35       ` Lowell Gilbert
@ 2010-05-12 15:42         ` Tim Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Johnson @ 2010-05-12 15:42 UTC (permalink / raw)
  To: help-gnu-emacs

On 2010-05-11, Lowell Gilbert <lgusenet@be-well.ilk.org> wrote:
> Tim Johnson <tim@johnsons-web.com> writes:
<...>
>>   My problem may be from a side effect of something else in my .emacs
>> 	or other configuration.
>
> It may be something not under your own control, however.
> In particular, some OS distributions add their own local 
> configurations to their emacs installations.
>
> I recommend doing the same test I did.  If it has the same
> problem you saw with your configuration, try the option
> "--no-site-file" as well.
  Done. And with the --no-site-file option syntax highlighting
	is the same. However, using -q
	(--no-init-file, -q          load neither ~/.emacs nor default.el)
	I have highlighting.
	I could probably find the problem by going thru my .emacs line by
	line, but I'm happy just to use 'require.
	thanks again 

-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-12 15:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10  1:42 No syntax highlighting in python mode Tim Johnson
2010-05-10 18:42 ` Tim Johnson
2010-05-10 20:19   ` Lowell Gilbert
2010-05-11  0:42     ` Tim Johnson
2010-05-11 14:35       ` Lowell Gilbert
2010-05-12 15:42         ` Tim Johnson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.