Cheetah Mode for Emacs
Here is a simple html derived mode for Cheetah templates files. The font-locking regexp can be improved thought but that’s a start.
(define-derived-mode cheetah-mode html-mode "Cheetah" (make-face 'cheetah-variable-face) (font-lock-add-keywords nil '( ("\\(#\\(from\\|else\\|include\\|set\\|import\\|for\\|if\\|end\\)+\\)\\>" 1 font-lock-type-face) ("\\(#\\(from\\|for\\|end\\)\\).*\\<\\(for\\|import\\|if\\|in\\)\\>" 3 font-lock-type-face) ("\\(\\$\\(?:\\sw\\|}\\|{\\|\\s_\\)+\\)" 1 font-lock-variable-name-face)) ) (font-lock-mode 1) ) (setq auto-mode-alist (cons '( "\\.tmpl\\'" . cheetah-mode ) auto-mode-alist )) |
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Here is an improved version with more keywords:
http://braydon.com/?p=436