author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 08 Nov 2011 11:47:48 +0200 | |
changeset 795 | 627ed33d9488 |
parent 773 | 9308a0c91624 |
child 1198 | 81709141a539 |
permissions | -rw-r--r-- |
604
9084d12d924d
Fix mode name for elisp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
386
diff
changeset
|
1 |
;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78 -*- |
42
04fd7747bc49
Update copyright notice.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
41
diff
changeset
|
2 |
;; |
278
35338cab99a9
Remove copyright as in public domain.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
277
diff
changeset
|
3 |
;; Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008-2010. |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
71
diff
changeset
|
4 |
;; |
110
6b6e3f8cb371
Set copyright notice.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
5 |
;; This file placed in public domain. |
6b6e3f8cb371
Set copyright notice.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
6 |
;; |
351
e30e4bd7e85e
Small spell correction.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
349
diff
changeset
|
7 |
;; For load order see README. |
6 | 8 |
|
92
359f03f8a64b
Move path definition to share place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
71
diff
changeset
|
9 |
;; ====================================================================== |
359f03f8a64b
Move path definition to share place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
71
diff
changeset
|
10 |
;; Load path. |
765
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
11 |
|
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
12 |
(defun my-find-subdirs (dir) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
13 |
(if (file-directory-p dir) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
14 |
(cons dir (apply 'append (mapcar 'my-find-subdirs (directory-files dir t "^[^.]")) ) ) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
15 |
)) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
16 |
(defun my-add-subdirs-to-load-path (dir) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
17 |
(mapc |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
18 |
(lambda (d) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
19 |
(add-to-list 'load-path d t) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
20 |
(message "Load-path updated with: %s" d) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
21 |
) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
22 |
(my-find-subdirs dir)) ) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
23 |
|
92
359f03f8a64b
Move path definition to share place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
71
diff
changeset
|
24 |
(defvar my-usr-el-dir |
359f03f8a64b
Move path definition to share place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
71
diff
changeset
|
25 |
(expand-file-name "~/usr/share/emacs/site-lisp") |
359f03f8a64b
Move path definition to share place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
71
diff
changeset
|
26 |
"Here live additional lisp packages.") |
765
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
27 |
(my-add-subdirs-to-load-path my-usr-el-dir) |
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
28 |
|
276
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
29 |
(defvar my-lisp-dir |
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
30 |
(expand-file-name "~/.emacs.d/my-lisp") |
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
31 |
"Here live my lisp packages.") |
765
bbeae3f53afa
Recursively add dirs from 'my-usr-el-dir' to 'load-path'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
32 |
(my-add-subdirs-to-load-path my-lisp-dir) |
71
8d0f605b4990
Define dir where stored extensions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
33 |
|
276
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
34 |
(defvar my-autoload (concat my-lisp-dir "/autoload-my.el") |
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
35 |
"Path to autoload for mode files.") |
773
9308a0c91624
Load auth info if possible. Load smtpmail if user provide server to use.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
765
diff
changeset
|
36 |
(defvar my-auth (expand-file-name "~/.emacs-auth") |
9308a0c91624
Load auth info if possible. Load smtpmail if user provide server to use.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
765
diff
changeset
|
37 |
"Path to auth info for Emacs.") |
386
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
38 |
(defvar dot-emacs-autogen (expand-file-name "~/.emacs-autogen") |
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
39 |
"Path to automatically generated config file. It content depend on |
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
40 |
installation environment and it was overridden on install.") |
111
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
41 |
(defvar dot-emacs-pre (expand-file-name "~/.emacs-pre") |
41
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
42 |
"Path to file with pre-loaded custom settings.") |
111
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
43 |
(defvar dot-emacs-post (expand-file-name "~/.emacs-post") |
41
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
44 |
"Path to file with post-loaded custom settings.") |
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
45 |
|
386
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
46 |
|
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
47 |
(if (file-exists-p dot-emacs-autogen) |
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
48 |
(load dot-emacs-autogen)) |
3efe37437745
Explore environment for abilities and tup config in ~/.emacs-autogen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
351
diff
changeset
|
49 |
|
773
9308a0c91624
Load auth info if possible. Load smtpmail if user provide server to use.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
765
diff
changeset
|
50 |
(if (file-exists-p my-auth) |
9308a0c91624
Load auth info if possible. Load smtpmail if user provide server to use.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
765
diff
changeset
|
51 |
(load my-auth)) |
9308a0c91624
Load auth info if possible. Load smtpmail if user provide server to use.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
765
diff
changeset
|
52 |
|
41
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
53 |
;; pre-load custom settings |
111
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
54 |
(if (file-exists-p dot-emacs-pre) |
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
55 |
(load dot-emacs-pre)) |
41
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
56 |
|
276
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
57 |
(if (file-exists-p my-autoload) |
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
58 |
(load my-autoload)) |
35d90ffc94e7
Load autoloads instead all mode files for speed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
235
diff
changeset
|
59 |
|
343
fb177bcb3d6f
Load 'custom-file' before "~/.emacs-my" as some settings can effect on require
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
304
diff
changeset
|
60 |
(setq custom-file "~/.emacs-custom.el") |
fb177bcb3d6f
Load 'custom-file' before "~/.emacs-my" as some settings can effect on require
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
304
diff
changeset
|
61 |
(if (file-exists-p custom-file) |
fb177bcb3d6f
Load 'custom-file' before "~/.emacs-my" as some settings can effect on require
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
304
diff
changeset
|
62 |
(load custom-file)) |
fb177bcb3d6f
Load 'custom-file' before "~/.emacs-my" as some settings can effect on require
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
304
diff
changeset
|
63 |
|
41
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
64 |
;; load main customization |
30
762d326dca54
Now .emacs only contain emacs custom settings and load my lisp code from separate file.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
17
diff
changeset
|
65 |
(load "~/.emacs-my") |
41
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
66 |
|
38dda673f17f
Added to be load pre-/post-load files with custom settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
37
diff
changeset
|
67 |
;; post-load custom settings |
111
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
68 |
(if (file-exists-p dot-emacs-post) |
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
69 |
(load dot-emacs-post)) |