update readme
[dot-emacs] / init.el
1 ;; Copyright (C) 2014 Ian Kelling
2
3 ;; This program is free software: you can redistribute it and/or modify
4 ;; it under the terms of the GNU General Public License as published by
5 ;; the Free Software Foundation, either version 3 of the License, or
6 ;; (at your option) any later version.
7
8 ;; This program is distributed in the hope that it will be useful,
9 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ;; GNU General Public License for more details.
12
13 ;; You should have received a copy of the GNU General Public License
14 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 ;; do m-x benchmark-init to see some benchmark stats
18 ;;(add-to-list 'load-path "~/.emacs.d/src/benchmark-init-el/")
19 ;;(require 'benchmark-init-loaddefs)
20 ;;(benchmark-init/activate)
21
22
23 ;;; init.el --- the start of customization
24
25 ;; (toggle-debug-on-error) ;uncomment to help debug
26
27 ;; stop from minimizing & freezing the gui
28
29 ;; Added by Package.el. This must come before configurations of
30 ;; installed packages. Don't delete this line. If you don't want it,
31 ;; just comment it out by adding a semicolon to the start of the line.
32 ;; You may delete these explanatory comments.
33 (package-initialize)
34
35 (global-unset-key (kbd "C-z"))
36
37 ;; these need to be done before the hook in order to satisfy the byte compiler
38 (add-to-list 'load-path "~/.emacs.d/elpa/smartparens-20140328.809")
39 (add-to-list 'load-path "~/.emacs.d/elpa/dash-20140308.656")
40
41 (add-to-list 'load-path "~/.emacs.d/src/yasnippet")
42 (add-to-list 'load-path "~/.emacs.d/src/ghci-completion")
43 (add-to-list 'load-path "~/.emacs.d/src")
44 (add-to-list 'load-path "~/.emacs.d/emacs/site-lisp/org")
45
46 ;; git version of gnus
47 (add-to-list 'load-path "~/.emacs.d/src/gnus/lisp")
48 (require 'info)
49 (add-to-list 'Info-default-directory-list "~/.emacs.d/src/gnus/texi")
50
51 ;; needed for git version
52 ;;(add-to-list 'load-path "~/.emacs.d/src/haskell-mode")
53 ;;(require 'haskell-mode-autoloads)
54 ;;(add-to-list 'Info-default-directory-list "~/.emacs.d/src/haskell-mode")
55
56 (require 'bbdb-loaddefs "~/.emacs.d/src/bbdb/lisp/bbdb-loaddefs.el")
57 (setq bbdb-print-tex-path "~/.emacs.d/src/bbdb/tex")
58
59
60 (add-to-list 'load-path "/a/opt/magit/git-modes")
61 (add-to-list 'load-path "/a/opt/magit/magit")
62
63
64 (add-hook 'server-visit-hook 'raise-frame)
65
66
67 ;; load init in `after-init-hook' so all packages are loaded
68 ;; todo, learn about the weird evaluation order of this hook that requires the quoting.
69 ;; adapted from starter-kit
70 (add-hook 'after-init-hook
71 `(lambda ()
72 ;; todo, set this var in my-init.org and use it instead
73 ;; of .emacs.d
74 (setq init-dir ,(file-name-directory load-file-name))
75 (unless (equal (user-uid) 0) ; don't make root owned files
76 (byte-recompile-directory init-dir))
77 ;; (byte-recompile-directory init-dir 0) ; with the 0,
78 ;; compile .el files that have no .elc file already
79
80 ;; this must be loaded first to avoid an error: void-function(cl-member)
81 (require 'cl)
82 ;; added org-habit, org-drill, org-mobile from the defaults
83
84 (require 'org)
85 (setq org-modules (quote (org-bbdb org-bibtex org-docview org-gnus
86 org-info org-jsinfo org-irc org-mew
87 org-mhe org-rmail org-vm org-wl org-w3m
88 org-habit org-drill org-mobile)))
89 (org-babel-load-file (expand-file-name "my-init.org" init-dir))))
90
91 ;;; init.el ends here