/
init.el
90 lines (72 loc) · 2.44 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
;; init.el --- Initialization file for my Emacs setup
;;; Commentary:
;; Get up and running, set custom to something else, and set up load paths
;; for the rest of the system. Then proceed to load each configuration file
;; for each module installed in emacs via load-cfg-files.
;;
;; TODO:
;; ffap support
;;
;;; Code:
;;; Load path setup
(setq disabled-command-function nil)
(setq emacs-config-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
(add-to-list 'load-path emacs-config-dir)
(add-to-list 'load-path (concat emacs-config-dir "/site/"))
;;; TODO: More to add here.
(setq autoload-file (concat emacs-config-dir "loaddefs.el"))
(setq site-root (concat emacs-config-dir "/site/"))
(setq custom-file (concat emacs-config-dir "custom.el"))
(setq package-user-dir (concat emacs-config-dir "elpa"))
(setq abbrev-file-name (concat emacs-config-dir "abbrev_defs"))
(defconst *emacs-config-dir* (concat emacs-config-dir "/configs/" ""))
;;; package.el configuration
(load (concat emacs-config-dir "package.el"))
(package-initialize)
(add-to-list 'package-archives '("ELPA" . "http://tromey.com/elpa/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(defun load-config-files (files)
(dolist (f files)
(load (expand-file-name
(concat *emacs-config-dir* f)))
(message "Loaded config file: %s" file)))
;; From the emacs starter kit.
(require 'cl)
(require 'saveplace)
(require 'ffap)
(require 'uniquify)
(require 'ansi-color)
(load-config-files '("defuns" ;; Has to go first
"global" ;; Has to go second
"anything-setup"
"color-theme-setup"
"auctex-setup"
"c-mode-setup"
"diredx-setup"
"erlang-setup"
"agda2-setup"
"epa-setup"
"eshell-setup"
"graphviz-mode-setup"
"magit-setup"
"hippie-expand-setup"
"ido-setup"
"midnight-setup"
"nxml-setup"
"org-setup"
"proof-general-setup"
"recentf-setup"
"tex-code"
"tramp-setup"
"tuareg-setup"
"go-mode-setup"
"haskell-mode-setup"
"uniquify-setup"))
(load custom-file 'noerror)
;;; init.el ends here
(put 'downcase-region 'disabled nil)
(put 'narrow-to-defun 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)