diff options
author | Evan Martin <martine@danga.com> | 2011-01-23 03:05:26 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-01-23 03:05:26 (GMT) |
commit | c1cb4f5ee82b1d41a5fb028aea0c6daa0461f050 (patch) | |
tree | 54e4b1f866d22df516e1552e58ded57426411cff /misc/ninja-mode.el | |
parent | b2a9106d92b53db28e97e3b2141ae86d4ac354e7 (diff) | |
download | Ninja-c1cb4f5ee82b1d41a5fb028aea0c6daa0461f050.zip Ninja-c1cb4f5ee82b1d41a5fb028aea0c6daa0461f050.tar.gz Ninja-c1cb4f5ee82b1d41a5fb028aea0c6daa0461f050.tar.bz2 |
fancier elisp, handle "include"
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 |