jimm / elisp
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Tue Dec 16 07:13:36 -0800 2008 | |
| |
README.rdoc | Sat Aug 15 21:10:18 -0700 2009 | |
| |
abbrev_defs.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
bootstrap-init.el | Sun Jan 25 16:33:23 -0800 2009 | |
| |
bootstrap/ | Mon Feb 01 06:29:28 -0800 2010 | |
| |
crypt++.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
dropdown-list.el | Tue Jul 28 12:18:33 -0700 2009 | |
| |
elpa/ | Mon Feb 01 06:44:46 -0800 2010 | |
| |
emacs.el | Mon Feb 08 15:31:24 -0800 2010 | |
| |
eshell-customize.el | Tue Apr 07 09:35:01 -0700 2009 | |
| |
eshell/ | Thu Nov 19 14:27:13 -0800 2009 | |
| |
flip.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
hexlify.rb | Tue Dec 16 07:11:37 -0800 2008 | |
| |
htmlize.el | Mon Sep 14 08:46:35 -0700 2009 | |
| |
http-twiddle.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
ido.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
inf-ruby.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
malyon.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
my-cygwin.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
my-emacs-wiki.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
my-environment.el | Sat Feb 14 15:35:33 -0800 2009 | |
| |
my-skeletons.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
org/ | Tue Dec 16 07:11:37 -0800 2008 | |
| |
pmd.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
progmodes/ | Tue Feb 02 12:34:09 -0800 2010 | |
| |
psvn.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
rails-find-other-file.el | Tue Dec 16 07:11:37 -0800 2008 | |
| |
remember/ | Tue Dec 16 07:11:37 -0800 2008 | |
| |
ri.el | Tue Dec 16 07:24:52 -0800 2008 | |
| |
ses/ | Tue Dec 16 07:11:37 -0800 2008 | |
| |
snippets/ | Wed Dec 09 10:48:39 -0800 2009 | |
| |
yasnippet.el | Tue Jul 28 12:18:33 -0700 2009 |
Introduction
Welcome to my Emacs initialization files.
The main initialization file is emacs.el, which is loaded as part of a machine-specific bootstrap process.
Bootstrap Process
Since I use Emacs on multiple machines, I came up with a customization scheme that lets me run "before" and "after" code for each machine around my main initialization code. Each domain (work, home, etc.) gets its own subdirectory and each machine gets its own subdirectory within the domain. Inside that are up to four files: dot_emacs, before.el, after.el, and the bookmark file emacs.bmk. The file ~/.emacs is a link to the dot_emacs file in that machine’s directory in the proper domain subdirectory.
Here’s the .emacs file on the machine I’m using right now, which is really a link to ~/Library/elisp/home/nimbus/dot_emacs:
;; -*- emacs-lisp -*- (defvar *my-emacs-lib-dir* "~/Library/elisp/") (defvar *my-pim-dir* "~/pim/") (load-file (concat *my-emacs-lib-dir* "bootstrap-init.el")) (bootstrap-init "home" "nimbux")
Here’s bootstrap-init.el:
;;; *my-emacs-lib-dir* must be defined
(defun bootstrap-file (domain machine file-name)
(concat *my-emacs-lib-dir* "bootstrap/" domain "/" machine "/" file-name))
(defun load-init-if-exists (domain machine file)
(let ((f (bootstrap-file domain machine (concat file ".el"))))
(if (file-exists-p f)
(load-file f))))
(defun bootstrap-init (domain machine)
(load-init-if-exists domain machine "before")
(load-file (concat *my-emacs-lib-dir* "emacs"))
(load-init-if-exists domain machine "after")
(setq bookmark-default-file
(bootstrap-file domain machine "emacs.bmk")))
So you can see that bootstrap-init runs a "before.el" file, then my main customization file "emacs.el", then an "after.el" file.
See Also
See also www.io.com/~jimm/emacs_tips.html.
