デフォルトのカラーテーマを変更するコードがあります。デフォルトよりもクラスを追加するので、この方法が好きですfont-lock
。
(defmacro /construct-face (name comment &rest args)
"Define face and specify attributes."
(list 'progn
(list 'defface name nil comment)
(nconc (list 'set-face-attribute (list 'quote name) nil) args)))
(/construct-face ⋅function-name "Face to highlight functions."
:foreground "SlateBlue")
(setq font-lock-function-name-face '⋅function-name)
(/construct-face ⋅comment "Face to display comments"
:foreground "gray20"
:bold t)
(setq font-lock-comment-face '⋅comment)
奇妙なことに、コメントの色は灰色になりましたが、関数の名前は紫色になりませんでした。違いは何ですか?何を確認すればよいですか?