cython-mode now works with python-mode and the builtin python package
authorRafe Kettler <rafe.kettler@gmail.com>
Fri, 25 Mar 2011 15:15:07 +0000 (11:15 -0400)
committerRafe Kettler <rafe.kettler@gmail.com>
Fri, 25 Mar 2011 15:15:07 +0000 (11:15 -0400)
Tools/cython-mode.el

index 53487da16c41118d4b051ab138666e028d50bde9..66a2d5e353ab5c6425b8caace6003f04bbf56f74 100644 (file)
@@ -1,6 +1,8 @@
 ;; Cython mode
 
-(require 'python-mode)
+;; Load python-mode if available, otherwise use builtin emacs python package
+(when (not(require 'python-mode nil t))
+  (require 'python))
 
 (add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
 (add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))