-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.el
93 lines (74 loc) · 2.97 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
;;; init.el --- Where all the magic begins
;;
;; 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"
;; Load path etc.
(setq dotfiles-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
(add-to-list 'load-path dotfiles-dir)
(let* ((my-lisp-dir (concat dotfiles-dir "/vendor"))
(default-directory my-lisp-dir))
(add-to-list 'load-path my-lisp-dir)
(normal-top-level-add-subdirs-to-load-path))
(setq autoload-file (concat dotfiles-dir "loaddefs.el"))
(setq custom-file (concat dotfiles-dir "custom.el"))
;; Don't clutter up directories with files~
(setq backup-directory-alist `(("." . ,(expand-file-name
(concat dotfiles-dir "backups")))))
(set-language-environment "UTF-8")
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
;; Set this to whatever browser you use
(setq browse-url-browser-function 'browse-default-macosx-browser)
;; (setq browse-url-browser-function 'browse-default-windows-browser)
;; (setq browse-url-browser-function 'browse-default-kde)
;; (setq browse-url-browser-function 'browse-default-epiphany)
;; (setq browse-url-browser-function 'browse-default-w3m)
;; (setq browse-url-browser-function 'browse-url-firefox)
;; (setq browse-url-browser-function 'browse-url-generic
;; browse-url-generic-program "~/src/conkeror/conkeror")
;; These should be loaded on startup rather than autoloaded on demand
;; since they are likely to be used in every session
(require 'cl)
(require 'ffap)
(require 'saveplace)
;; Save a list of recent files visited.
(require 'recentf)
(recentf-mode 1)
(require 'init-defuns)
(require 'init-bindings)
(require 'init-appearance)
(require 'init-text)
(require 'init-vc)
(require 'init-shell)
(require 'init-lisp)
(require 'init-perl)
(require 'init-ruby)
(require 'init-ml)
(require 'init-js)
(require 'init-c)
(require 'init-erlang)
(require 'init-registers)
(regen-autoloads)
(load custom-file 'noerror)
;; Work around a bug on OS X where system-name is FQDN
(if (eq system-type 'darwin)
(setq system-name (car (split-string system-name "\\."))))
;; You can keep system- or user-specific customizations here
(setq system-specific-config (concat dotfiles-dir system-name ".el")
user-specific-config (concat dotfiles-dir user-login-name ".el")
user-specific-dir (concat dotfiles-dir user-login-name))
(add-to-list 'load-path user-specific-dir)
(if (file-exists-p system-specific-config) (load system-specific-config))
(if (file-exists-p user-specific-config) (load user-specific-config))
(if (file-exists-p user-specific-dir)
(mapc #'load (directory-files user-specific-dir nil ".*el$")))
;; Aquamacs handles this...
;(server-start)
(provide 'init)
;;; init.el ends here