branch: externals/caml
commit 7b99dbce43569898969696438e10852ec7f5cfc4
Author: Jacques Garrigue <garrigue at math.nagoya-u.ac.jp>
Commit: Jacques Garrigue <garrigue at math.nagoya-u.ac.jp>
update labels
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3115
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-font.el | 23 +++++++++--------------
caml-hilit.el | 11 ++++-------
2 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/caml-font.el b/caml-font.el
index e190f74..3e8b5d2 100644
--- a/caml-font.el
+++ b/caml-font.el
@@ -42,15 +42,8 @@
"[0-9][0-9][0-9]\\)\\|.\\)" caml-quote-char
"\\|\"[^\"\\]*\\(\\\\\\(.\\|\n\\)[^\"\\]*\\)*\"")
'font-lock-string-face)
-;labels (and open)
- '("\\(\\([~?]\\|\\<\\)[a-z][a-z0-9_']*:\\)[^:=]" 1
- font-lock-variable-name-face)
- '("\\<\\(assert\\|open\\|include\\)\\>\\|[~?][ (]*[a-z][a-z0-9_']*"
- . font-lock-variable-name-face)
;modules and constructors
- '("\\(\\<\\|:\\)\\([A-Z][A-Za-z0-9_']*\\)\\>"
- 2 font-lock-function-name-face)
- '("`[A-Za-z][A-Za-z0-9_']*\\>" . font-lock-function-name-face)
+ '("`?\\<[A-Z][A-Za-z0-9_']*\\>" . font-lock-function-name-face)
;definition
(cons (concat
"\\<\\(a\\(nd\\|s\\)\\|c\\(onstraint\\|lass\\)"
@@ -61,8 +54,7 @@
"\\|v\\(al\\(ue\\)?\\|irtual\\)\\)\\>")
'font-lock-type-face)
;blocking
- '("\\(\\<\\|:\\)\\(begin\\|end\\|object\\|s\\(ig\\|truct\\)\\)\\>"
- 2 font-lock-keyword-face)
+ '("\\<begin\\|end\\|object\\|s\\(ig\\|truct\\)\\>" . font-lock-keyword-face)
;control
(cons (concat
"\\<\\(do\\(ne\\|wnto\\)?\\|else\\|for\\|if"
@@ -70,15 +62,18 @@
"\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>"
"\\|\|\\|->\\|&\\|#")
'font-lock-reference-face)
- '("\\<raise\\>" . font-lock-comment-face)))
+ '("\\<raise\\>" . font-lock-comment-face)
+;labels (and open)
+ '("\\(\\([~?]\\|\\<\\)[a-z][a-z0-9_']*:\\)[^:=]" 1
+ font-lock-variable-name-face)
+ '("\\<\\(assert\\|open\\|include\\)\\>\\|[~?][ (]*[a-z][a-z0-9_']*"
+ . font-lock-variable-name-face)))
(defconst inferior-caml-font-lock-keywords
(append
(list
;inferior
- '("^[#-]" . font-lock-comment-face)
-;labels
- '("[? \t]:[A-Za-z][A-Za-z0-9_']*\\>" . font-lock-variable-name-face))
+ '("^[#-]" . font-lock-comment-face))
caml-font-lock-keywords))
;; font-lock commands are similar for caml-mode and inferior-caml-mode
diff --git a/caml-hilit.el b/caml-hilit.el
index 68ba853..4ec631c 100644
--- a/caml-hilit.el
+++ b/caml-hilit.el
@@ -16,12 +16,11 @@
nil
'string)
;labels
- '("[?]?\\<[A-Za-z][A-Za-z0-9_\']*:" nil brown)
- '("[?]?\\<:[A-Za-z][A-Za-z0-9_\']*\\>" nil brown)
+ '("\\(\\([~?]\\|\\<\\)[a-z][a-z0-9_']*:\\)[^:=]" 1 brown)
+ '("[~?][ (]*[a-z][a-z0-9_']*" nil brown)
;modules
'("\\<\\(assert\\|open\\|include\\)\\>" nil brown)
- '("\\<[A-Z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
- '("`[A-Za-z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
+ '("`?\\<[A-Z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
;definition
(list (concat
"\\<\\(a\\(nd\\|s\\)\\|c\\(onstraint\\|lass\\)"
@@ -49,9 +48,7 @@
(append
(list
;inferior
- '("^[#-]" nil firebrick)
- '("`[A-Za-z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
- '("[? \t]:[A-Za-z][A-Za-z0-9_\']*\\>" nil brown))
+ '("^[#-]" nil firebrick))
caml-mode-patterns))
(provide 'caml-hilit)