你的意思是說你喜歡顏色更好還是顏色更多?
如果是後者,可能很難在caml模式下使用tuareg字體鎖定功能,儘管我只是看了一下這兩點。
如果是前者,您可以簡單地自定義caml-mode
使用的面部以使用更好的面部(我的意思是字體或「顏色」)。使用足夠新的emacs,將光標放在要更改的錶盤上並鍵入M-x customize-face RET
。它會提示您所在的臉部名稱,因此請再次點擊返回。然後你可以用任何你想要的方式改變臉部。作爲第一步,你可能會保持tuareg.el
打開查看面孔是有什麼,比如
(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)
是用於讓利,所以你只需把你的讓利,M-x customize-face RET RET
光標臉的定義,然後更改前景變爲藍色並打開粗體(假設您的背景爲淺色)。不要忘記保存它。
或者,您可以編輯caml-font.el
並更改caml-font-lock-keywords
部分以使用您喜歡的字體(可能來自tuareg)。如果您想添加到您的.emacs
,則應將其更改爲(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)
...
))