cython mode, smerge mode, updates
[emacs-init.git] / setup / cython.el
1 ;;; cython-mode.el -- A derivation of python-mode for Cython .pyx and .pxd files
2
3 (require 'python-mode)
4 (define-derived-mode cython-mode python-mode "Cython"
5   (font-lock-add-keywords
6    nil
7    `((,(concat "\\<\\(NULL"
8                "\\|c\\(def\\|har\\|typedef\\)"
9                "\\|e\\(num\\|xtern\\)"
10                "\\|float"
11                "\\|in\\(clude\\|t\\)"
12                "\\|object\\|public\\|struct\\|type\\|union\\|void"
13                "\\|cppclass\\|cimport\\|namespace\\|inline"
14                "\\)\\>")
15       1 font-lock-keyword-face t))))
16 (provide 'cython-mode)
17
18 (add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
19 (add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))