chiark / gitweb /
el/dot-emacs.el: Define stub mode for editing Pyrex.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 27 Jul 2017 10:00:52 +0000 (11:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 27 Jul 2017 10:04:07 +0000 (11:04 +0100)
I'm not using the `official' one any more, because it depends on Pymacs
and I'm just not going there.

el/dot-emacs.el

index e290e5ad4b46aa94d77405c2db1350fff752bf1c..dc619187a37471b8de8a71d351b1412542ec0282 100644 (file)
@@ -2640,6 +2640,14 @@ (defun mdw-fontify-pyrex ()
                "property" "raise" "return" "struct" "try" "while" "with"
                "yield")))
 
+(define-derived-mode pyrex-mode python-mode "Pyrex"
+  "Major mode for editing Pyrex source code")
+(setq auto-mode-alist
+      (append '(("\\.pyx$" . pyrex-mode)
+               ("\\.pxd$" . pyrex-mode)
+               ("\\.pxi$" . pyrex-mode))
+             auto-mode-alist))
+
 ;;;--------------------------------------------------------------------------
 ;;; Lua programming style.