diff options
Diffstat (limited to 'misc/ninja-mode.el')
-rw-r--r-- | misc/ninja-mode.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/misc/ninja-mode.el b/misc/ninja-mode.el index b3982a4..0cb740c 100644 --- a/misc/ninja-mode.el +++ b/misc/ninja-mode.el @@ -2,10 +2,13 @@ ;; Just some syntax highlighting for now. (setq ninja-keywords - '(("^#.*" . font-lock-comment-face) - ("^\\<rule\\>\\|^\\<build\\>\\|^\\<subninja\\>" . font-lock-keyword-face) - ("\\([[:alnum:]_]+\\) =" . (1 font-lock-variable-name-face)) - )) + (list + '("^#.*" . font-lock-comment-face) + (cons (concat "^" (regexp-opt '("rule" "build" "subninja" "include") + 'words)) + font-lock-keyword-face) + '("\\([[:alnum:]_]+\\) =" . (1 font-lock-variable-name-face)) + )) (define-derived-mode ninja-mode fundamental-mode "ninja" (setq comment-start "#") ; Pass extra "t" to turn off syntax-based fontification -- we don't want |