diff options
author | Fanael Linithien <fanael4@gmail.com> | 2014-11-22 17:22:11 (GMT) |
---|---|---|
committer | Fanael Linithien <fanael4@gmail.com> | 2014-11-23 21:23:35 (GMT) |
commit | 2f7f4ae945f440744fb5addc39c637e48f5a08f2 (patch) | |
tree | 8fa9c7cdfcad6ad35ac41d352f20a797d2706b75 /misc/ninja-mode.el | |
parent | a13b64746022ab1f5f47c18b0bd1cc3c909e210e (diff) | |
download | Ninja-2f7f4ae945f440744fb5addc39c637e48f5a08f2.zip Ninja-2f7f4ae945f440744fb5addc39c637e48f5a08f2.tar.gz Ninja-2f7f4ae945f440744fb5addc39c637e48f5a08f2.tar.bz2 |
Use quasi-quoting instead of list+cons.
Diffstat (limited to 'misc/ninja-mode.el')
-rw-r--r-- | misc/ninja-mode.el | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/misc/ninja-mode.el b/misc/ninja-mode.el index ad1722c..48709bc 100644 --- a/misc/ninja-mode.el +++ b/misc/ninja-mode.el @@ -22,21 +22,20 @@ ;;; 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:]_.-]+\\)" . + `(("^#.*" . font-lock-comment-face) + (,(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 |