.emacs中的多个自定义设置面和自定义设置变量?
问题描述:
当我通过自定义的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 ...)
答
如果手动添加自定义的面孔,保持在自定义设置的面孔。
对于具有多个(custom-set-faces ...)
或(custom-set-variables ...)
名单,我刚才测试了这个(在Emacs 23.1)。它们的确有用 - Emacs将处理所有列表 - 然而,如果您使用M-x customize-face
添加新的自定义面(类似于变量)并将其保存为将来的会话,Emacs将把所有列表合并为一个。只保留一个。