我希望[]和()在颜色上有很明显的区别,但不要相同。
(set-face-foreground 'facename "Orange")
(set-face-background 'facename "Purple")
或者,为了更好地控制面部,可以使用以下其他函数:
set-face-background
set-face-font
set-face-inverse-video-p
set-face-underline
set-face-background-pixmap
set-face-foreground
set-face-stipple
set-face-underline-p
你可以在emacs.el文件中全局使用它们,或者在你的模式挂钩函数中调用它们,仅为特定模式设置face。
这取决于使用了哪些faces
,而这又由在您的buffer
中使用的major
和minor
模式确定。如果有两个不同的面对应于[]和(),那么您只需要自定义这些面。如果没有2个面,则必须定义您想要的一个或两个变体。相关函数称为defface
。