emacs for OS X
Wezzy
fabio.trezziCANCELLAMI at email.it
Tue Apr 20 09:23:21 EDT 2004
Tuxtrax <See_my at Signature.com.invalid> wrote:
> Hi all
>
> My editor of choice on linux for python, bar none, is xemacs. I love the
> python mode that detects a python file and handles indentation and
> coloration for me automagically.
>
> I have been using a powerbook for a while now, and I finally found emacs
> for aqua in OS X Jaguar (10.2.8). I downloaded it from porkrind.com. The
> version of emacs is 21.3 I believe. Anyway, not only does it *not*
> detect python files automatically, but it tries to use fundamental mode
> to handle them which is a pain in the ass. I want my coloring and
> indentation back, damn it all!
>
> I found python-mode.el in the python distribution folder, but not only
> do I have no clue as to what to do with it, I can't find an emacs folder
> or a .emac file. Just the emac program. Any help with this would be
> greatly appreciated. If you have overcome this yourself I especially
> want to hear from you.
>
> In other news.....
>
I use Emacs with Panther but i think that the situation is the same.
Download python-mode from python.org:
http://www.python.org/emacs/python-mode/python-mode.el
Compile the file
Move both file where emacs can find them
Open Terminal
The .emacs file is into your home folder (tipically /Users/<youid>) so
when you open terminal you are already in the right place
add the following lines to your .emacs file :
(setq auto-mode-alist
(cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python" . python-mode)
interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
(i've found this code in www.python.org)
Now when you try to open a .py file emacs loads python-mode
Hope this helps
--
Ciao
Fabio
More information about the Python-list
mailing list