use cooper theme -- end of git, I am trying livemesh
[srid.dotfiles.git] / emacs / external / ml / caml-hilit.el
blobc4160d9553eb0051779d963631c3c9da91ced73f
1 ;(***********************************************************************)
2 ;(* *)
3 ;(* Objective Caml *)
4 ;(* *)
5 ;(* Jacques Garrigue and Ian T Zimmerman *)
6 ;(* *)
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. *)
10 ;(* *)
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
22 (list
23 ;comments
24 '("\\(^\\|[^\"]\\)\\((\\*[^*]*\\*+\\([^)*][^*]*\\*+\\)*)\\)"
25 2 comment)
26 ;string
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)
30 nil
31 'string)
32 ;labels
33 '("\\(\\([~?]\\|\\<\\)[a-z][a-zA-Z0-9_']*:\\)[^:=]" 1 brown)
34 '("[~?][ (]*[a-z][a-zA-Z0-9_']*" nil brown)
35 ;modules
36 '("\\<\\(assert\\|open\\|include\\)\\>" nil brown)
37 '("`?\\<[A-Z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
38 ;definition
39 (list (concat
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\\)\\)\\>")
45 nil 'ForestGreen)
46 ;blocking
47 '("\\<\\(object\\|struct\\|sig\\|begin\\|end\\)\\>" 2 include)
48 ;control
49 (list (concat
50 "\\<\\(do\\(ne\\|wnto\\)?\\|else\\|for\\|i\\(f\\|gnore\\)"
51 "\\|lazy\\|match\\|new\\|or\\|t\\(hen\\|o\\|ry\\)"
52 "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>"
53 "\\|\|\\|->\\|&\\|#")
54 nil 'keyword)
55 '(";" nil struct))
56 "Hilit19 patterns used for Caml mode")
58 (hilit-set-mode-patterns 'caml-mode caml-mode-patterns)
59 (hilit-set-mode-patterns
60 'inferior-caml-mode
61 (append
62 (list
63 ;inferior
64 '("^[#-]" nil firebrick))
65 caml-mode-patterns))
67 (provide 'caml-hilit)