Hilit19 settings for python

Ivan Herman (Ivan.Herman@cwi.nl)
Mon, 25 Apr 1994 06:48:21 GMT

Somebody asked for hilit19 mode for python. This is the setting I use in
my .emacs file. It is not perfect; it works, though.

(let
(
(scomments '(("#.*$" nil comment)))
)

(hilit-set-mode-patterns
'(py-mode python-mode)
(append
scomments
'(
("'[^'].*'" nil string)
("[ \t]*def[ \t]" nil defun)
("[ \t]class[ \t].*$" nil decl)
("[ \t]*import .*$" nil include)
("[^_]\\<\\(while\\|if\\|elif\\|else\\|break\\|exit\\|continue\\|print\\|for\\|in\\)\\>[^_]" 1 keyword)
("[ \t]*try[ \t]*.*$" nil type)
("[ \t]*except[ \t]*.*$" nil type)
)))
;; end of let
)