From c1cb4f5ee82b1d41a5fb028aea0c6daa0461f050 Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Sat, 22 Jan 2011 19:05:26 -0800 Subject: fancier elisp, handle "include" --- misc/ninja-mode.el | 11 +++++++---- 1 file 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) - ("^\\\\|^\\\\|^\\" . 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 -- cgit v0.12