Emacs で新しいフェイスを定義しましたが、カラーリングが有効になりません。の面とモードの定義は次の~/.emacs
とおりです。
(defface sml-highlight-operator-face
'((t (:foreground "red")))
"SML operator highlighting"
:group 'basic-faces)
(defvar sml-font-lock-keywords
((,(regexp-opt '("fun" "fn" "let" "val" "datatype" "type" "case" "of" "end" "structure" "struct" "signature" "sig"))
(0 font-lock-keyword-face))
("[][=|><-+;,{}():]" (0 sml-highlight-operator-face))))
;;;###autoload
(define-derived-mode sml-mode prog-mode "SML"
"SML major mode."
(set (make-local-variable 'comment-start) "(* ")
(set (make-local-variable 'comment-end) " *)")
(set (make-local-variable 'font-lock-defaults)
'(sml-font-lock-keywords)))
ただし、font-lock-builtin-face
代わりに使用すると、sml-highlight-operator-face
それらの文字が強調表示されます (ただし、色は望ましくありません)。私は間違って何をしていますか?