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