what is custom-set-variables and faces in my .emacs?

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 the customize-* commands to edit them.


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:

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

or, if you're still using an old-fashioned ~/.emacs file:

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

A slightly more complex snippet that will work in either case is:

(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file)

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 with set-face-attribute:

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

In order to customize face of some package one sometimes need to request the package first, and after that set its face:

(require 'mumamo)
(set-face-attribute 'mumamo-background-chunk-major nil :background nil)