Entering the python mode in emacs.

piet at cs.uu.nl piet at cs.uu.nl
Thu Jun 22 04:04:36 EDT 2000


>>>>> olczyk at interaccess.com (Thaddeus L. Olczyk) (TLO) writes:

TLO> Is it possible to configure emacs so that it automatically starts in
TLO> python mode when opening a file *.py?

You do this in the standard emacs way:

(setq auto-mode-alist
      (cons '("\\.pyw?$" . python-mode) auto-mode-alist))

or

(add-to-list 'auto-mode-alist '("\\.pyw?$" . python-mode))

It is also useful (at least on Unix) to have

(add-to-list 'interpreter-mode-alist '("python" . python-mode))
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list