Skip to content

Commit

Permalink
A new beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
sshirokov committed Feb 25, 2013
1 parent afd7564 commit a7435be
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 27 deletions.
8 changes: 0 additions & 8 deletions custom/init.el

This file was deleted.

File renamed without changes.
12 changes: 12 additions & 0 deletions init.d/00-paths.el
@@ -0,0 +1,12 @@
;; Set our standard load paths
(add-dir-and-subdirs-to-path "~/.emacs.d/elisp")
(add-dir-and-subdirs-to-path "~/.emacs.d/vendor")

;; Change the location of the customization info
;; And load our defaults
(let ((base-custom "~/.emacs.d/custom/base.el")
(custom "~/.emacs.d/custom/custom.el"))
(load base-custom)
(setf custom-file custom)
(when (file-exists-p custom-file)
(load custom-file)))
4 changes: 4 additions & 0 deletions init.d/01-require.el
@@ -0,0 +1,4 @@
(require 'smex)
(require 'dedicated)
(require 'coffee-mode)
(require 'ssh)
File renamed without changes.
1 change: 1 addition & 0 deletions init.d/03-theme.el
@@ -0,0 +1 @@
(load-theme 'wombat t)
15 changes: 1 addition & 14 deletions init.el
@@ -1,14 +1 @@
;; Settle load path
(load "~/.emacs.d/elisp/load-paths")


(load "~/.emacs.d/custom/init")
(load "~/.emacs.d/custom/keys")

(load "~/.emacs.d/themes/init")

;; TODO: Move
(require 'smex)
(require 'dedicated)
(require 'coffee-mode)
(require 'ssh)
(load "~/.emacs.d/lib/init")
5 changes: 5 additions & 0 deletions lib/init.el
@@ -0,0 +1,5 @@
;; Load our lib
(load (format "%s%s" (file-name-directory load-file-name) "lib"))

;; Bootsrap!
(load-in-order "~/.emacs.d/init.d")
15 changes: 13 additions & 2 deletions elisp/load-paths.el → lib/lib.el
@@ -1,6 +1,19 @@
(require 'cl)

(defun load-in-order (dir)
"Load all the files in directory `dir'
sorted in the order of `directory-files'."
(let ((dir (expand-file-name dir)))
(unless (file-directory-p dir)
(error "%s is not a directory" dir))
(loop for file in (directory-files dir :full)
unless (file-directory-p file)
do (load file))))

(defun* add-dir-and-subdirs-to-path (dir &key extra)
"Add directory `dir' and direct subdires of `dir'
to `load-path'. Any directories named by the kwarg
`:extra' will be recursively added by `add-dir-and-subdirs-to-path'"
(let* ((dir (expand-file-name dir))
(dir (when (file-directory-p dir) dir)))
(when dir
Expand All @@ -13,5 +26,3 @@
(add-dir-and-subdirs-to-path (expand-file-name sub dir)))
(add-to-list 'load-path (expand-file-name sub dir))))))
load-path)

(add-dir-and-subdirs-to-path "~/.emacs.d/elisp" :extra "vendor")
Empty file added themes/.gitignore
Empty file.
3 changes: 0 additions & 3 deletions themes/init.el

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a7435be

Please sign in to comment.