[Tutor] newbie request for help in setting up emacs for pytho n

alan.gauld@bt.com alan.gauld@bt.com
Tue Dec 31 06:34:03 2002


> (setq interpreter-mode-alist
>       (cons '("python" . python-mode)
>             interpreter-mode-alist))
> 
> [I'm not sure what this line does, but I found it in an 
> example, it works, so I don't mess with it.]

If it aint broke... is a good thing to follow in emacs.

Programmatically what it does (in Python style) is:

interpreter_mode_list = interpreter_mode_list.append( ('python',
python_mode) )

Actually it might be insert() rather than append, I can't 
remember the sequence from cons...

> No, I'm right with you there.  emacs is a hell of a lot more 
> easy to use than to configure, at least for a beginner.  

Not just for beginners! I've used emacs for 10 years now and 
still mess with my .emacs files as little as possible!

Alan g.