2013-04-07 117 views
2

當我通過自定義的M-x customize-face菜單臉和更改保存到磁盤時,Emacs增加了自動生成的代碼,以我的.emacs文件看起來像這樣:.emacs中的多個自定義設置面和自定義設置變量?

(custom-set-faces 
;; custom-set-faces was added by Custom. 
;; If you edit it by hand, you could mess it up, so be careful. 
;; Your init file should contain only one such instance. 
;; If there is more than one, they won't work right. 
; 
;; SOME CODE 
; 
) 

其中SOME CODE是一樣的東西:

'(diredp-dir-priv ((t (:foreground "cyan")))) 

現在,假設我想手動更改爲SOME CODE,並可能添加更多代碼來修改其他面。將這些更改保留在custom-set-faces區塊下是否明智?或者我應該將其移動到不同的塊(以避免Emacs變得困惑)

另外,Emacs會弄糊塗嗎我有多個(custom-set-faces ...)塊? (同樣的問題對於(custom-set-variables ...)

回答

4

如果手動添加自定義的面孔,保持在自定義設置的面孔。

對於具有多個(custom-set-faces ...)(custom-set-variables ...)名單,我剛纔測試了這個(在Emacs 23.1)。它們的確有用 - Emacs將處理所有列表 - 然而,如果您使用M-x customize-face添加新的自定義面(類似於變量)並將其保存爲將來的會話,Emacs將把所有列表合併爲一個。只保留一個。