PDA

View Full Version : Emacs Syntax Highlight


wizzkid
January 16th, 2006, 02:47 AM
I tried to use emacs and I find it good but kinda confusing, guess i have to get used to it. one thing is I open a .py file, but the sytax is not highlighted, even .php..

In option. Syntax highlighting, active global highlighting, parent match highlighting iare ticked

thnks

toojays
January 16th, 2006, 04:05 AM
Perhaps the correct mode is not being loaded. What modes does the mode-line say you are using? Do you get syntax highlighting if you edit a C file?

For Python files, you should install python-mode. There would be a mode for PHP somewhere, but I don't know if it's in synaptic.

wizzkid
January 16th, 2006, 04:29 AM
Yes In C its working. okay I will check on synaptics :) thanks a lot.

Wallakoala
January 16th, 2006, 10:15 AM
You need to install python-mode for emacs via synaptic. Then it should work.

wizzkid
February 5th, 2006, 09:07 AM
HI, I re-install my Kubuntu together with all the applications.

Then Emacs was re-install.. now the syntax highlight does not work. I already installed the python-mode and php-mode, but doesnt help.. any clue on this?

beewer
May 28th, 2006, 04:50 AM
Hi.

I have also same problem. Emacs doesn't show any syntax highlight for python code. I have installed python-mode but it didn't help.

Any ideas what would help? Should I put some options to my ~/.emacs?

-b

lucnoc
June 3rd, 2006, 08:17 PM
You need to enable syntax highlighting:

* from the menu bar: Options->Syntax Highlighting (Global Font Lock Mode).
* or M-x global-font-lock-mode

You may want also to save this setting in the .emacs or using Options->Save Options.

Hope that helps.
Cheers
l
--

kiwibird
June 13th, 2006, 07:57 AM
I believe you need to put this into your .emacs:

(require 'php-mode)
(require 'python-mode)

And of course, save the settings after turning on global font lock mode (which'll put a customize-section into your .emacs).