1 ;(***********************************************************************)
5 ;(* Jacques Garrigue and Ian T Zimmerman *)
7 ;(* Copyright 1997 Institut National de Recherche en Informatique et *)
8 ;(* en Automatique. All rights reserved. This file is distributed *)
9 ;(* under the terms of the GNU General Public License. *)
11 ;(***********************************************************************)
13 ;(* $Id: caml-hilit.el,v 1.8.4.1 2004/08/09 16:09:33 doligez Exp $ *)
15 ; Highlighting patterns for hilit19 under caml-mode
17 ; defined also in caml.el
18 (defvar caml-quote-char
"'"
19 "*Quote for character constants. \"'\" for Objective Caml, \"`\" for Caml-Light.")
21 (defconst caml-mode-patterns
24 '("\\(^\\|[^\"]\\)\\((\\*[^*]*\\*+\\([^)*][^*]*\\*+\\)*)\\)"
27 (list 'hilit-string-find
(string-to-char caml-quote-char
) 'string
)
28 (list (concat caml-quote-char
"\\(\\\\\\([ntbr" caml-quote-char
"\\]\\|"
29 "[0-9][0-9][0-9]\\)\\|.\\)" caml-quote-char
)
33 '("\\(\\([~?]\\|\\<\\)[a-z][a-zA-Z0-9_']*:\\)[^:=]" 1 brown
)
34 '("[~?][ (]*[a-z][a-zA-Z0-9_']*" nil brown
)
36 '("\\<\\(assert\\|open\\|include\\)\\>" nil brown
)
37 '("`?\\<[A-Z][A-Za-z0-9_\']*\\>" nil MidnightBlue
)
40 "\\<\\(a\\(nd\\|s\\)\\|c\\(onstraint\\|lass\\)"
41 "\\|ex\\(ception\\|ternal\\)\\|fun\\(ct\\(ion\\|or\\)\\)?"
42 "\\|in\\(herit\\)?\\|let\\|m\\(ethod\\|utable\\|odule\\)"
43 "\\|of\\|p\\(arser\\|rivate\\)\\|rec\\|type"
44 "\\|v\\(al\\|irtual\\)\\)\\>")
47 '("\\<\\(object\\|struct\\|sig\\|begin\\|end\\)\\>" 2 include
)
50 "\\<\\(do\\(ne\\|wnto\\)?\\|else\\|for\\|i\\(f\\|gnore\\)"
51 "\\|lazy\\|match\\|new\\|or\\|t\\(hen\\|o\\|ry\\)"
52 "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>"
56 "Hilit19 patterns used for Caml mode")
58 (hilit-set-mode-patterns 'caml-mode caml-mode-patterns
)
59 (hilit-set-mode-patterns
64 '("^[#-]" nil firebrick
))