-
Notifications
You must be signed in to change notification settings - Fork 2
/
jml-mode.el
24 lines (18 loc) · 889 Bytes
/
jml-mode.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;; a simple major mode, mymath-mode
;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html
(setq jml-highlights
'(("\\[macro" . 'font-lock-function-name-face)
("<\\([^>]+?\\)>" . (1 'font-lock-warning-face))
;; ("<\\([^>]+?\\)>" . (1 'font-lock-regexp-grouping-backslash))
("\\[macro \\([^\]\s]+\\)" . (1 'font-lock-type-face))
("\\[\\([^\]\/\s]+\\)" . (1 'font-lock-property-use-face))
("@\\w+" 0 font-lock-string-face t)
("\\$\\w+" 0 font-lock-string-face t)
("\\[" 0 font-lock-keyword-face t)
("\\]" 0 font-lock-keyword-face t)
("\\[\\(\w+\))" 0 font-lock-warning-face t)
))
;;type ‘M-x list-faces-display’. With a prefix argument, this prompts for
(define-derived-mode jml-mode fundamental-mode "jml"
"major mode for editing jml language code."
(setq font-lock-defaults '(jml-highlights)))