Heh, my .emacs file is a horrible morass of random snippets, custom functions and ugly hacks. One of these days, I'm going to extract the useful bits and make them readable, but for now it just isn't worth it.
So, be warned: reading my .emacs file is probably a path to madness. Also, I rely on a fairly large collection of external .el files, some of which I either wrote or modified myself, so some of it won't work out of the box.
With that disclaimer out of the way, you can read it here: http://inst.eecs.berkeley.edu/~tikhon/.emacs.html. I colored it with M-x htmlfontify-buffer, which is an awesome command :). If you want the raw version, just drop the .html from the end.
EDIT: Also, note that this is for Emacs 23; some of it (like the color theme stuff) is useless on Emacs 24, but I haven't moved over yet. I'm too spoiled by yum to build my programs from source :).
I found it really helpful to break my .emacs up into several files. Aside from trying to load .emacs, it will also try .emacs.d/init.el -- mine sets up the load path and then loads .emacs.d/my-options.el, etc. That way, the sprawling growth stays compartmentalized.
No guarantees this will work on xemacs, older versions of GNU emacs, or whatever, but here's what I use (some of which is adapted from the excellent Emacs wiki (http://emacswiki.org):
(push "~/.emacs.d/" load-path) ; my init files
(push "~/.emacs.d/elisp/" load-path) ; other elisp pkgs
; byte-compile files in ~/.emacs.d/ whenever we change them
(defun byte-compile-init-files ()
(when (and
(string-match "/\.emacs.d/" buffer-file-name)
(string-match "\.el" buffer-file-name))
(when (file-exists-p (concat buffer-file-name ".elc"))
(delete-file (concat buffer-file-name ".elc")))
(byte-compile-file buffer-file-name)
(if (get-buffer (concat (buffer-name) "c")) ;.el -> .elc
(kill-buffer (concat (buffer-name) "c")))))
(add-hook 'after-save-hook 'byte-compile-init-files)
; don't disable commands or mess with my init, grr grr
(setq disabled-command-function 'nil)
(defun my-load-wrap (fname)
"Compile stuff if the .el file is newer than the .elc, and load."
(let* ((fpath "~/.emacs.d/")
(fn (concat fpath fname ".el")))
(if (not (file-readable-p fn))
(message (concat "File " fname " does not exist!")))
(if (or
(not (file-readable-p (concat fn "c")))
(newer-file (file-last-mod-time fn) ;some .el
(file-last-mod-time (concat fn "c")))) ;compiled
(byte-compile-file fn t) ;compile and load
(load fn t)))) ;load with failsafe
(my-load-wrap "my-options") ; general options
(my-load-wrap "my-functions") ; my misc functions
(my-load-wrap "my-server") ; emacs-server stuff
(my-load-wrap "my-calendar") ; cal/diary options
(my-load-wrap "my-bindings") ; and lots of 'em
(my-load-wrap "my-packages") ; misc packages
(my-load-wrap "my-text") ; text mode hooks
(my-load-wrap "my-programming") ; python, c, lisp, ocmal, etc
(my-load-wrap "my-web") ; for browsing w/ w3m
(my-load-wrap "my-irc") ; rcirc stuff
(my-load-wrap "my-skel") ; skeletons, boo
; load my-aesthetic last, so if there's an error the
; faces don't get set, and to ensure faces from all packages exist
(my-load-wrap "my-aesthetic") ; faces, interface stuff