conf

view .emacs.d/init.el @ 337:c7fd3e83cdda

fix fic-ext-mode.el and ack.el loading
author Alexander Solovyov <alexander@solovyov.net>
date Thu Dec 16 10:38:18 2010 +0100
parents 64e7053e69d6
children 5827fdd29a76
line source
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; GNU Emacs configuration
3 ;; (c) Alexander Solovyov 2004-2008
4 ;; piranha AT piranha.org.ua
5 ;;
6 ;; Thanks to all, who has helped me in creation, especially to:
7 ;; Yuriy Sazonets
8 ;; Alex Ott
9 ;; Emacswiki.org
10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 (defun add-to-path (dir)
13 (add-to-list 'load-path
14 (format "~/.emacs.d/%s" dir)))
16 (defun load-init (modules)
17 "Load initialization files"
18 (mapc (lambda (name)
19 (load (format "%s_init" name)))
20 modules))
22 (defmacro fun-for-bind (func &rest args)
23 "Returns a symbol of an anonymous interactive function,
24 suitable for binding to keys."
25 `(lambda () (interactive) (,func ,@args)))
27 ;; initialize el-get
28 (if (not (load "~/.emacs.d/el-get/el-get/el-get" t))
29 (throw 'not-configured "Install el-get to get dependencies: https://github.com/dimitri/el-get/"))
30 (setq el-get-sources '())
31 (defmacro el-get-add (item)
32 `(add-to-list 'el-get-sources ',item))
34 (setq custom-file "~/.emacs.d/load/custom_init.el")
36 (add-to-path 'load) ; initialization
37 (add-to-path 'packages) ; additional packages
38 (let ((default-directory "~/.emacs.d/packages/"))
39 (normal-top-level-add-subdirs-to-load-path))
41 (when (file-exists-p "~/.secrets.el")
42 (load-file "~/.secrets.el"))
44 ;;; ELPA
45 (setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
46 ("gnu" . "http://elpa.gnu.org/packages/")))
47 (package-initialize)
49 (defun autocompile ()
50 "Compile itself if this is config file"
51 (interactive)
52 (if (or
53 (string-match ".emacs.d/load/[a-z]+_init.el$" (buffer-file-name))
54 (string-match ".emacs.d/init.el$" (buffer-file-name)))
55 (byte-compile-file (buffer-file-name))))
57 (add-hook 'after-save-hook 'autocompile)
59 (load-init
60 '(general frame funs modes keys
61 bs eshell org custom))
63 ;; run el-get now
64 (el-get)
Repositories maintained by Alexander Solovyov