Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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...

like image 265
rabidmachine9 Avatar asked Feb 19 '11 16:02

rabidmachine9


People also ask

What is SETQ in Elisp?

Special Form: setq [symbol form]… This special form is the most common method of changing a variable's value. Each symbol is given a new value, which is the result of evaluating the corresponding form . The current binding of the symbol is changed. setq does not evaluate symbol ; it sets the symbol that you write.

What is Defcustom?

In addition to calling defvar as a subroutine, defcustom states how the variable should be displayed in the Customize interface, the values it is allowed to take, etc. Macro: defcustom option standard doc [keyword value]… ¶ This macro declares option as a user option (i.e., a customizable variable).


2 Answers

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) 
like image 129
sanityinc Avatar answered Oct 06 '22 23:10

sanityinc


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.

like image 21
Noufal Ibrahim Avatar answered Oct 06 '22 23:10

Noufal Ibrahim