cython-mode.el

Neal Becker ndbecker2 at gmail.com
Thu Feb 28 19:52:42 EST 2008


This one works with gnu-emacs, but not xemacs.  Anyone know why?

It's supposed to just add some font-lock keywords to python mode, but
it seems to override the python keywords instead (only the cython additions
seen below get highlighted, not the original python ones).

;;;; `Cython' mode.

(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))

(define-derived-mode cython-mode python-mode "Cython"
  (font-lock-add-keywords
   nil
   `((,(concat "\\<\\(NULL"
               "\\|c\\(def\\|har\\|typedef\\)"
               "\\|e\\(num\\|xtern\\)"
               "\\|float"
               "\\|in\\(clude\\|t\\)"
               "\\|object\\|public\\|struct\\|type\\|union\\|void"
               "\\)\\>")
      1 font-lock-keyword-face t))))




More information about the XEmacs-Beta mailing list