Syntax highlights with python-mode in emacs
Erik Max Francis
max at alcyone.com
Mon Aug 14 16:40:07 EDT 2000
FR Chalaoux wrote:
> What's the tip to highlight the syntax with python-mode in emacs ?
Put something like this in 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 hacking mode." t)
(defun my-python-mode-hook ()
(setq-default indent-tabs-mode nil)
)
(add-hook 'python-mode-hook 'my-python-mode-hook)
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ He who can, does. He who cannot, teaches.
\__/ George Bernard Shaw
Physics reference / http://www.alcyone.com/max/reference/physics/
A physics reference.
More information about the Python-list
mailing list