Next: , Up: Customizing   [Index]


4.3.1 Customization File

The following variable is user-customizable:

Variable: custom-file

File used for storing customization information. The default is ‘nil’, which means to use your init file as specified by user-init-file. If the value is not ‘nil’, it should be an absolute file name.

While you can use Customize to set this option, it is easier and safer to use the following procedure. Instead of using Customize, write something like the following in your init file:

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

When you change this variable outside Custom, look in the previous custom file (usually your init file) for the forms ‘(custom-set-variables …)’ and ‘(custom-set-faces …)’, and move them (whichever ones you find) to the new custom file. This will preserve your existing customizations.