diff options
author | Evan Martin <martine@danga.com> | 2011-01-08 23:42:29 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-01-08 23:42:29 (GMT) |
commit | 3446e3407c5da628b487e31fcfee2fb4fa2bd52c (patch) | |
tree | 304592e9e28814ddbf16e142f8f5edc8a054374d /misc | |
parent | 3e633fc71dc1f78fc68b25b3238e2e78118a3a00 (diff) | |
download | Ninja-3446e3407c5da628b487e31fcfee2fb4fa2bd52c.zip Ninja-3446e3407c5da628b487e31fcfee2fb4fa2bd52c.tar.gz Ninja-3446e3407c5da628b487e31fcfee2fb4fa2bd52c.tar.bz2 |
improved emacs mode
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ninja-mode.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/ninja-mode.el b/misc/ninja-mode.el index ddbcfd8..b3982a4 100644 --- a/misc/ninja-mode.el +++ b/misc/ninja-mode.el @@ -2,9 +2,13 @@ ;; Just some syntax highlighting for now. (setq ninja-keywords - '(("^\\<rule\\>\\|^\\<build\\>\\|^\\<subninja\\>" . font-lock-keyword-face) + '(("^#.*" . font-lock-comment-face) + ("^\\<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)) + (setq comment-start "#") + ; Pass extra "t" to turn off syntax-based fontification -- we don't want + ; quoted strings highlighted. + (setq font-lock-defaults '(ninja-keywords t)) ) |