sex-mode: add supported keywords, drop chicken-*
All checks were successful
Sex CI / build-linux (pull_request) Successful in 5m59s
All checks were successful
Sex CI / build-linux (pull_request) Successful in 5m59s
This commit is contained in:
62
sex-mode.el
62
sex-mode.el
@@ -59,48 +59,64 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
|
|||||||
(defconst sex-font-lock-keywords
|
(defconst sex-font-lock-keywords
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(list
|
(list
|
||||||
;; Declarations
|
;; Declarations. `pub' and `extern' are optional prefixes, so
|
||||||
|
;; `(pub fn main' highlights both keywords and the name.
|
||||||
(list (concat "("
|
(list (concat "("
|
||||||
(regexp-opt '("chicken-define"
|
"\\(?:\\(pub\\|extern\\)[[:space:]]+\\)?"
|
||||||
"chicken-define-syntax"
|
(regexp-opt '("define"
|
||||||
"chicken-import"
|
|
||||||
"chicken-load"
|
|
||||||
"define"
|
|
||||||
"defmacro"
|
"defmacro"
|
||||||
"extern"
|
"enum"
|
||||||
|
"fn"
|
||||||
"import"
|
"import"
|
||||||
"include"
|
"include"
|
||||||
"fn"
|
|
||||||
"ops"
|
"ops"
|
||||||
"pub"
|
|
||||||
"record"
|
|
||||||
"realize"
|
"realize"
|
||||||
|
"record"
|
||||||
"spec"
|
"spec"
|
||||||
"struct"
|
"struct"
|
||||||
"sum"
|
"sum"
|
||||||
"var"
|
"typedef"
|
||||||
"union")
|
"union"
|
||||||
'word)
|
"var")
|
||||||
"\\>"
|
'words)
|
||||||
"[[:space:]]*"
|
"[[:space:]]*"
|
||||||
"\\([[:word:]]*\\)")
|
"\\([[:word:]]*\\)")
|
||||||
'(1 font-lock-keyword-face)
|
'(1 font-lock-keyword-face nil t)
|
||||||
'(2 font-lock-function-name-face))
|
'(2 font-lock-keyword-face)
|
||||||
;; Keywords
|
'(3 font-lock-function-name-face nil t))
|
||||||
|
;; Statement and expression heads, plus the macro-language forms
|
||||||
|
;; that appear in `defmacro' bodies.
|
||||||
(list (concat "("
|
(list (concat "("
|
||||||
(regexp-opt '("do"
|
(regexp-opt '("break"
|
||||||
|
"c-bit-or"
|
||||||
|
"c-bit-or="
|
||||||
|
"c-or"
|
||||||
"case"
|
"case"
|
||||||
|
"case/fallthrough"
|
||||||
|
"cast"
|
||||||
|
"closure"
|
||||||
|
"continue"
|
||||||
"default"
|
"default"
|
||||||
"if"
|
"do"
|
||||||
|
"else"
|
||||||
"for"
|
"for"
|
||||||
|
"get-method"
|
||||||
"goto"
|
"goto"
|
||||||
|
"if"
|
||||||
|
"lambda"
|
||||||
|
"map-fields"
|
||||||
"match"
|
"match"
|
||||||
|
"realizes?"
|
||||||
"return"
|
"return"
|
||||||
|
"sizeof"
|
||||||
|
"static-assert"
|
||||||
"switch"
|
"switch"
|
||||||
"var"
|
"type-match"
|
||||||
"while")
|
"type-of"
|
||||||
'word)
|
"while"
|
||||||
"\\>")
|
"$"
|
||||||
|
":")
|
||||||
|
'words))
|
||||||
'(1 font-lock-builtin-face))))
|
'(1 font-lock-builtin-face))))
|
||||||
"Font-lock keywords for Sex mode.")
|
"Font-lock keywords for Sex mode.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user