gpt4 book ai didi

emacs - .emacs 中的多个自定义设置面和自定义设置变量?

转载 作者:行者123 更新时间:2023-12-04 13:50:23 24 4
gpt4 key购买 nike

当我通过 M-x customize-face 菜单自定义外观并将更改保存到磁盘时,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 block 下是否明智?或者我应该把它移到另一个 block (以避免 Emacs 混淆)

此外,Emacs 是否会对我有多个 (custom-set-faces ... ) block 感到困惑? (同样的问题 (custom-set-variables ...)

最佳答案

如果您手动添加自定义面孔,请将其保存在 custom-set-faces 中。

至于有多个 (custom-set-faces ... )(custom-set-variables ... ) 列表,我刚刚测试了这个 (在 Emacs 23.1 中)。它们确实有效 - Emacs 将处理所有列表 - 但是,如果您随后使用 M-x customize-face 添加新的自定义面孔(对于变量类似)并将其保存以供将来使用,Emacs 将合并所有列表合二为一。所以,您可能应该只保留那个。

关于emacs - .emacs 中的多个自定义设置面和自定义设置变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15867556/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com