From: Mike Shulman Date: Thu, 7 Sep 2017 04:42:43 +0000 (-0700) Subject: separate syntax highlighting for keywords and builtins X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=43cc0190e29affee8e7eaffd0cca5bf52e1d9107;p=cubicaltt.git separate syntax highlighting for keywords and builtins --- diff --git a/cubicaltt.el b/cubicaltt.el index e1b6070..0b80db1 100644 --- a/cubicaltt.el +++ b/cubicaltt.el @@ -58,6 +58,10 @@ "with" "module" "where" "U" "opaque" "transparent" "transparent_all") "Keywords for cubical.") +(defvar cubicaltt-operations + '("PathP" "comp" "transport" "fill" "Glue" "glue" "unglue" "Id" "idC" "idJ") + "Operations for cubical.") + (defvar cubicaltt-special '("undefined" "primitive") "Special operators for cubical.") @@ -66,6 +70,10 @@ (regexp-opt cubicaltt-keywords 'words) "Regexp that recognizes keywords for cubical.") +(defvar cubicaltt-operations-regexp + (regexp-opt cubicaltt-operations 'words) + "Regexp that recognizes operations for cubical.") + (defvar cubicaltt-operators-regexp (regexp-opt '(":" "->" "=" "|" "\\" "*" "_" "<" ">" "\\/" "/\\" "-" "@") t) "Regexp that recognizes operators for cubical.") @@ -78,7 +86,8 @@ "Regexp that recognizes the beginning of a cubical definition.") (defvar cubicaltt-font-lock-keywords - `((,cubicaltt-keywords-regexp . font-lock-type-face) + `((,cubicaltt-keywords-regexp . font-lock-keyword-face) + (,cubicaltt-operations-regexp . font-lock-builtin-face) (,cubicaltt-operators-regexp . font-lock-variable-name-face) (,cubicaltt-special-regexp . font-lock-warning-face) (,cubicaltt-def-regexp . font-lock-function-name-face))