diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-04-20 10:06:19 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-04-20 10:06:19 +0000 |
commit | c7657e4ca33b055d6377b13f088fdb1e1a437bce (patch) | |
tree | 98e0268de9238b605eed20e38c92d461b85ce1b3 | |
parent | 422c5fa201ad54c4fede8c2b080b752afa66ef8f (diff) |
update labels
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3115 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | emacs/caml-font.el | 23 | ||||
-rw-r--r-- | emacs/caml-hilit.el | 11 |
2 files changed, 13 insertions, 21 deletions
diff --git a/emacs/caml-font.el b/emacs/caml-font.el index e190f74f2..3e8b5d286 100644 --- a/emacs/caml-font.el +++ b/emacs/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/emacs/caml-hilit.el b/emacs/caml-hilit.el index 68ba8532f..4ec631c5d 100644 --- a/emacs/caml-hilit.el +++ b/emacs/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) |