From 3446e3407c5da628b487e31fcfee2fb4fa2bd52c Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Sat, 8 Jan 2011 15:42:29 -0800 Subject: improved emacs mode --- misc/ninja-mode.el | 8 ++++++-- 1 file 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 - '(("^\\\\|^\\\\|^\\" . font-lock-keyword-face) + '(("^#.*" . font-lock-comment-face) + ("^\\\\|^\\\\|^\\" . 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)) ) -- cgit v0.12