29

これは私の.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")))))

これまでのところ、これらの線の上に必要なものをすべて追加しています...

4

3 に答える 3

66

customizeNoufalが指摘したように、これらのブロックはインターフェイスによって追加されます。ただし、必要に応じて、それらを別のファイルに移動できます。

~/.emacs.d/init.elこれをあなたの:に追加するだけです

(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)

または、まだ昔ながらの ~/.emacsファイルを使用している場合:

(setq custom-file "~/.custom.el")
(load custom-file)

どちらの場合でも機能するもう少し複雑なスニペットは次のとおりです。

(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file)
于 2011-02-20T17:38:58.137 に答える
17

これらは、カスタマイズシステムを使用するときにファイルに追加される行です。を使用すると生成されますcustomize-*。デフォルトでは、カスタマイズオプションは.emacsファイルに保存されます。通常、これらを手動で編集することはありません。customize-*それらを編集するには、コマンドを使用する必要があります。

于 2011-02-19T16:51:45.297 に答える
10

これらの行に手動で何も追加しないでください。変更は、一部のイベントでemacsによって無効になります。代わりに、カスタム変数customize-set-variableとカスタム面を追加しset-face-attributeます。

(customize-set-variable 'blink-cursor-mode nil)
(set-face-attribute 'default nil :family "DejaVu Sans Mono")

一部のパッケージの面をカスタマイズするには、最初にパッケージを要求し、その後その面を設定する必要がある場合があります。

(require 'mumamo)
(set-face-attribute 'mumamo-background-chunk-major nil :background nil)
于 2015-06-30T10:15:03.817 に答える