-
Notifications
You must be signed in to change notification settings - Fork 6
/
init.el
62 lines (50 loc) · 2.06 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
;;; init.el --- Where all the magic begins
;;
;; Part of the Emacs Starter Kit
;;
;; This is the first thing to get loaded.
;;
;; "Emacs outshines all other editing software in approximately the
;; same way that the noonday sun does the stars. It is not just bigger
;; and brighter; it simply makes everything else vanish."
;; -Neal Stephenson, "In the Beginning was the Command Line"
;; Turn off mouse interface early in startup to avoid momentary display
;; You really don't need these; trust me.
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
;; Load path etc.
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name))
private-config-dir (concat dotfiles-dir "private")
vendor-dir (concat dotfiles-dir "vendor"))
(add-to-list 'load-path dotfiles-dir)
(add-to-list 'load-path vendor-dir)
(load "private/libraries")
(load "private/backup")
(cond
((string-match "nt" system-configuration)
(load "private/platforms/windows"))
((string-match "apple" system-configuration)
(load "private/platforms/mac")))
(load "private/customize")
(load "private/defun")
(load "private/bindings")
(load "private/display")
(load "private/misc")
(load "private/el-get-init")
;; load extensions
(mapc #'load
(directory-files (concat private-config-dir "/extensions") t ".*elc?$"))
;; load language configurations
(mapc #'load
(directory-files (concat private-config-dir "/languages") t ".*elc?$"))
;; You can keep system- or user-specific customizations here
(setq system-specific-config (concat dotfiles-dir "machines/" system-name ".el")
user-specific-config (concat dotfiles-dir user-login-name ".el"))
(if (file-exists-p (concat dotfiles-dir "local.el")) (load "local") )
(if (file-exists-p system-specific-config) (load system-specific-config))
(if (file-exists-p user-specific-config) (load user-specific-config))
;; activate disabled features
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)