From 43cc0190e29affee8e7eaffd0cca5bf52e1d9107 Mon Sep 17 00:00:00 2001 From: Mike Shulman Date: Wed, 6 Sep 2017 21:42:43 -0700 Subject: [PATCH] separate syntax highlighting for keywords and builtins --- cubicaltt.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)) -- 2.34.1