Python-mode for Emacs on Athena

From 6.006 Wiki

(Difference between revisions)
Jump to: navigation, search
Juang (Talk | contribs)
(Copying from Spring 2008)

Latest revision as of 22:56, 9 August 2008

For GNU Emacs (emacs) on Athena

We have installed a Python mode, supporting indentation, syntax highlighting, and other useful features, in the 6.006 locker (because one is not installed by default on Athena). To use it, add the following lines to your .emacs file in your home directory:

(setq load-path `("/afs/athena.mit.edu/course/6/6.006/elisp" . ,load-path))
(load-library "python-mode")

It should then automatically be loaded when you open Python (.py) files.

If you do not have syntax highlighting turned on already, add this line to your .emacs file:

(global-font-lock-mode t)