Do you mean that you like the colors better or that their are more colors?
If the latter, it's probably difficult to use tuareg font-locking with caml-mode, though I only looked at the two a little bit.
If it's the former, you can simply customize the faces used by caml-mode
to use better faces (by which I mean typeface or "color"). With a sufficiently new emacs, put your cursor on the face that you want to change and type M-x customize-face RET
. It will suggest the name of the face that you are on, so hit return again. Then you can change the face in any way you want. As a first step you might keep tuareg.el
open and check what faces are there, for example
(defface tuareg-font-lock-governing-face
'((((background light)) (:foreground "blue" :bold t))
(t (:foreground "orange" :bold t)))
"Face description for governing/leading keywords."
:group 'tuareg-faces)
is the definition of the face used for let, so you would just put your cursor on let, M-x customize-face RET RET
, then change the foreground to blue and turn on bold (assuming you have a light background). Don't forget to save it.
Alternately, you can edit caml-font.el
and change the caml-font-lock-keywords
section to use the fonts you like (which could be from tuareg). If you want to add to your .emacs
instead then you should change it to (setq caml-font-lock-keywords ...)
.
(defconst caml-font-lock-keywords
(list
...
;definition
(cons (concat
"\\<\\(a\\(nd\\|s\\)\\|c\\(onstraint\\|lass\\)"
"\\|ex\\(ception\\|ternal\\)\\|fun\\(ct\\(ion\\|or\\)\\)?"
"\\|in\\(herit\\|itializer\\)?\\|let"
"\\|m\\(ethod\\|utable\\|odule\\)"
"\\|of\\|p\\(arser\\|rivate\\)\\|rec\\|type"
"\\|v\\(al\\(ue\\)?\\|irtual\\)\\)\\>")
;; 'font-lock-type-face)
'tuareg-font-lock-governing-face)
...
))