diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ninja-mode.el | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/misc/ninja-mode.el b/misc/ninja-mode.el index 0eae72e..ad1722c 100644 --- a/misc/ninja-mode.el +++ b/misc/ninja-mode.el @@ -22,22 +22,22 @@ ;;; Code: (defvar ninja-keywords - (list - '("^#.*" . font-lock-comment-face) - (cons (concat "^" (regexp-opt '("rule" "build" "subninja" "include" - "pool" "default") - 'words)) - font-lock-keyword-face) - '("\\([[:alnum:]_]+\\) =" . (1 font-lock-variable-name-face)) - ;; Variable expansion. - '("\\($[[:alnum:]_]+\\)" . (1 font-lock-variable-name-face)) - '("\\(${[[:alnum:]._]+}\\)" . (1 font-lock-variable-name-face)) - ;; Rule names - '("rule +\\([[:alnum:]_.-]+\\)" . (1 font-lock-function-name-face)) - ;; Build Statement - highlight the rule used, - ;; allow for escaped $,: in outputs. - '("build +\\(?:[^:$\n]\\|$[:$]\\)+ *: *\\([[:alnum:]_.-]+\\)" . - (1 font-lock-function-name-face)))) + (list + '("^#.*" . font-lock-comment-face) + (cons (concat "^" (regexp-opt '("rule" "build" "subninja" "include" + "pool" "default") + 'words)) + font-lock-keyword-face) + '("\\([[:alnum:]_]+\\) =" . (1 font-lock-variable-name-face)) + ;; Variable expansion. + '("\\($[[:alnum:]_]+\\)" . (1 font-lock-variable-name-face)) + '("\\(${[[:alnum:]._]+}\\)" . (1 font-lock-variable-name-face)) + ;; Rule names + '("rule +\\([[:alnum:]_.-]+\\)" . (1 font-lock-function-name-face)) + ;; Build Statement - highlight the rule used, + ;; allow for escaped $,: in outputs. + '("build +\\(?:[^:$\n]\\|$[:$]\\)+ *: *\\([[:alnum:]_.-]+\\)" . + (1 font-lock-function-name-face)))) ;;;###autoload (define-derived-mode ninja-mode prog-mode "ninja" |