Improvements to ninja-mode
authorHumza <contact@secondplanetanimation.com>
Sun, 13 Nov 2011 16:30:10 +0000 (11:30 -0500)
committerHumza <contact@secondplanetanimation.com>
Sun, 13 Nov 2011 16:30:10 +0000 (11:30 -0500)
* provide ninja-mode feature
* highlight rule names

misc/ninja-mode.el

index 0ae925a..ff62e92 100644 (file)
@@ -24,6 +24,8 @@
        '("\\([[:alnum:]_]+\\) =" . (1 font-lock-variable-name-face))
        ;; Variable expansion.
        '("\\($[[:alnum:]_]+\\)" . (1 font-lock-variable-name-face))
+       ;; Rule names
+       '("rule \\([[:alnum:]_]+\\)" . (1 font-lock-function-name-face))
        ))
 (define-derived-mode ninja-mode fundamental-mode "ninja"
   (setq comment-start "#")
@@ -31,3 +33,5 @@
   ; quoted strings highlighted.
   (setq font-lock-defaults '(ninja-keywords t))
   )
+
+(provide 'ninja-mode)