1 ;;; cython-mode.el -- A derivation of python-mode for Cython .pyx and .pxd files
4 (define-derived-mode cython-mode python-mode "Cython"
5 (font-lock-add-keywords
7 `((,(concat "\\<\\(NULL"
8 "\\|c\\(def\\|har\\|typedef\\)"
9 "\\|e\\(num\\|xtern\\)"
11 "\\|in\\(clude\\|t\\)"
12 "\\|object\\|public\\|struct\\|type\\|union\\|void"
13 "\\|cppclass\\|cimport\\|namespace\\|inline"
15 1 font-lock-keyword-face t))))
16 (provide 'cython-mode)
18 (add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
19 (add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))