summaryrefslogtreecommitdiffstats
path: root/misc/ninja-mode.el
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2010-12-05 00:09:50 (GMT)
committerEvan Martin <martine@danga.com>2010-12-05 00:09:50 (GMT)
commit42d237e7841679b27cd5dcae82d143d86a87a807 (patch)
tree253b0cf88ecf3b0404146a7c7945dd4c660afa04 /misc/ninja-mode.el
parentd0025e234cf3fc0a13f45d179880578285609b59 (diff)
downloadNinja-42d237e7841679b27cd5dcae82d143d86a87a807.zip
Ninja-42d237e7841679b27cd5dcae82d143d86a87a807.tar.gz
Ninja-42d237e7841679b27cd5dcae82d143d86a87a807.tar.bz2
move src into subdir
Diffstat (limited to 'misc/ninja-mode.el')
-rw-r--r--misc/ninja-mode.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/ninja-mode.el b/misc/ninja-mode.el
new file mode 100644
index 0000000..ddbcfd8
--- /dev/null
+++ b/misc/ninja-mode.el
@@ -0,0 +1,10 @@
+;; Simple emacs mode for editing .ninja files.
+;; Just some syntax highlighting for now.
+
+(setq ninja-keywords
+ '(("^\\<rule\\>\\|^\\<build\\>\\|^\\<subninja\\>" . font-lock-keyword-face)
+ ("\\([[:alnum:]_]+\\) =" . (1 font-lock-variable-name-face))
+ ))
+(define-derived-mode ninja-mode fundamental-mode "ninja"
+ (setq font-lock-defaults '(ninja-keywords))
+ )