emacs的外观包括文本区的外观,辅助区的外观,状态行的外观,光标的外观等,html
每一个外观都有名字,而且都有下面属性:node
Emacs can display text in several different styles, called faces. Each face can specify various face attributes, such as the font, height, weight, slant, foreground and background color, and underlining or overlining. Most major modes assign faces to the text automatically, via Font Lock mode. c++
注意:face里并不设定全部属性,没有被设定的属性就使用叫default的face的属性。好比face:popup-face,它只设定了前景色和背景色属性,全部它的其余属性的值就是face:default的相应属性的值。微信
这个概念很是重要,因此当改变了face:default里属性的值的话,就会影响全部faceapp
Font Lock mode is a minor mode, always local to a particular buffer, which assigns faces to (or fontifies) the text in the buffer. Each buffer's major mode tells Font Lock mode which text to fontify; for instance, programming language modes fontify syntactically relevant constructs like comments, strings, and function names.ide
Font Lock mode is enabled by default in major modes that support it. To toggle it in the current buffer, type M-x font-lock-mode.函数
font-lock-mode :做用在当前缓冲区学习
global-font-lock-mode:做用在当前缓冲区字体
Font Lock mode uses several specifically named faces to do its job, including font-lock-string-face
, font-lock-comment-face
, and others. The easiest way to find them all is to use code
从下图能够看出来:
1,关键字(font lock keyward face)后面是紫色,因此右面代码里关键字(template,protected,try等)部分全是紫色
2,函数名(font lock function name face)后面是蓝色,因此右面代码里函数名(insert,get_node等)部分全是蓝色
如何在上面的画面操做请参考Changing a Variable