Emacs: M-x customize Tutorial
Emacs has a textual GUI system for setting user preferences . It lets you customize emacs without needing to know emacs lisp.
Now, try it. You can use mouse to click links or buttons.
Click “Apply” button to make your changes effective immediately.
The “Apply and Save” button will create lisp code and insert to your emacs init file. So that, your preferences will be effective next time you start emacs.
Here's example of the generated lisp code:
(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. '(abbrev-mode t) '(auto-save-default nil) '(comment-column 2) '(current-language-environment "UTF-8") '(default-input-method "latin-1-prefix") '(ffap-newfile-prompt t) '(font-lock-maximum-decoration 2) '(indicate-empty-lines nil) '(initial-major-mode (quote text-mode)) '(initial-scratch-message "") ;; … )
Now, look at your emacs init file.
[see Emacs: Init File Tutorial]
You can reset your customization by deleting generated code in your emacs init, then restart emacs.
customize-group to customize a particular mode directly.
For example, Alt+x
customize-group, then type “dired”. That page will let you change dired settings.
customize-group is a great way to explore a mode's features.
Custom vs Manual Lisp Code
The Custom system does NOT include all possible variable settings. Also, many emacs customization require lisp code, not just setting variables.
Some emacs users use Custom system whenever possible, but others avoid it completely.
- Advantage of custom system: simple and easier to use than manually maintain basic preferences.
- Disadvantage of custom system: all variables are together in alphabetical order, not categorized by mode or purpose. Also, personal hooks and other settings cannot be grouped there.
When you use custom, emacs may also generates the following related to font or syntax coloring.
(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. '(completions-common-part ((t (:inherit default :foreground "red")))) '(diredp-compressed-file-suffix ((t (:foreground "#7b68ee")))) '(diredp-ignored-file-name ((t (:foreground "#aaaaaa")))) '(isearch ((((class color) (min-colors 88) (background light)) (:background "black" :foreground "white")))) '(show-paren-match ((((class color) (background light)) (:background "azure2")))))
( thanks to
Per Abrahamsen at
- Emacs init file
- Install Packages
- Install Package Manually
- Define Keys
- M-x customize
- What's Major Mode?
- What's Minor Mode?
- Set File to Open in a Major Mode
- Organize Init File
- Byte Compile Elisp
- What's Hook?
- Environment Variables in Emacs
- Set Default Window Size
- Font Setup
- Set Color Theme
- Turn Off Auto Backup
- Check OS, Version, Host Name
- Check Defined/Loaded