我的 .emacs 中的自定义设置变量和面孔是什么?
这是在我的 .emacs 中,我可以修改它吗?
(custom-set-variables
;; custom-set-variables 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.
)
(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.
'(better-fringes-bitmap ((t (:foreground "#00dd44"))))
'(font-lock-string-face ((((class color) (min-colors 88) (background light)) (:foreground "#113355")))))
到目前为止,我正在将我想要的所有内容添加到这些行之上......
this is in my .emacs can I mess with it or not?
(custom-set-variables
;; custom-set-variables 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.
)
(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.
'(better-fringes-bitmap ((t (:foreground "#00dd44"))))
'(font-lock-string-face ((((class color) (min-colors 88) (background light)) (:foreground "#113355")))))
so far I am adding everything I want above these lines...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如 Noufal 指出的,这些块是通过
customize
接口添加的。不过,如果您愿意,可以将它们移动到单独的文件中。只需将其添加到您的
~/.emacs.d/init.el
中:或者,如果您仍在使用 老式
~/.emacs
文件:稍微有点在这两种情况下都适用的更复杂的片段是:
These blocks are added by the
customize
interface, as Noufal pointed out. You can move them to a separate file, though, if you like.Just add this to your
~/.emacs.d/init.el
:or, if you're still using an old-fashioned
~/.emacs
file:A slightly more complex snippet that will work in either case is:
这些是当您使用 customise 系统时添加到文件中的行。它们是在您使用
customize-*
时生成的。默认情况下,自定义选项存储在.emacs
文件中。您通常不会手动编辑它们。您必须使用customize-*
命令来编辑它们。These are lines added to the file when you use the customise system. They're generated when you use
customize-*
. By default, the customisation options are stored in the.emacs
file. You don't usually edit these by hand. You have to use thecustomize-*
commands to edit them.不要手动向这些行添加任何内容 - 在某些事件中,您的更改将被 emacs 消失。相反,使用
customize-set-variable
添加自定义变量,并使用set-face-attribute
添加自定义外观:为了自定义某些包的外观,有时需要先请求该包,然后设置它的脸:
Don't add anything to these lines manually — your changes will be vanished by emacs on some events. Instead add custom variables with
customize-set-variable
and custom faces withset-face-attribute
:In order to customize face of some package one sometimes need to request the package first, and after that set its face: