;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;    J. Matt Peterson's new emacs setup.                 ;;;;
;;;;    https://gist.github.com/2019332                     ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'hippie-exp)

;;; marmalade package repo and setup.
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

(when (not package-archive-contents)
  (package-refresh-contents))

;; my packages
(defvar my-packages
  '(clojure-mode
    clojurescript-mode
    color-theme-sanityinc-tomorrow
    find-file-in-git-repo
    gist
    magit
    nrepl
    paredit
    rainbow-mode
    scpaste
    smex
    smooth-scroll
    solarized-theme
    starter-kit
    starter-kit-bindings
    starter-kit-eshell
    starter-kit-js
    starter-kit-lisp
    tango-2-theme
    textmate
    tidy
    undo-tree
    virtualenv
    wget
    yaml-mode
    zenburn-theme)
  "A list of packages to ensure are installed at launch.")

(dolist (p my-packages)
  (when (not (package-installed-p p))
    (package-install p)))



;;; themes
(cond
 ((and (window-system) (eq system-type 'darwin))
  (load-theme 'tango-2 t))
 ((and (window-system) (eq system-type 'nt))
  (load-theme 'solarized-dark t))
 ((window-system)
  (load-theme 'deeper-blue))
 (t (load-theme 'tango-2 t))) ; default to tango-2



;;; fonts
(cond
 ((and (window-system) (eq system-type 'darwin))
  (progn
    (set-face-attribute 'default nil :font "-outline-Menlo-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1")
    (set-face-font 'italic "-outline-Menlo-normal-italic-normal-mono-*-*-*-*-c-*-iso8859-1")
    (set-face-font 'bold  "-outline-Menlo-bold-normal-normal-mono-*-*-*-*-c-*-iso8859-1" )
    (set-face-font 'bold-italic "-outline-Menlo-bold-italic-normal-mono-*-*-*-*-c-*-iso8859-1")))
 ((and (window-system) (eq system-type 'windows-nt)) ;; Windows Case.
  (progn
    (set-face-attribute 'default nil :font "-outline-Consolas-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1")
    (set-face-font 'italic "-outline-Consolas-normal-italic-normal-mono-*-*-*-*-c-*-iso8859-1")
    (set-face-font 'bold  "-outline-Consolas-bold-normal-normal-mono-*-*-*-*-c-*-iso8859-1" )
    (set-face-font 'bold-italic "-outline-Consolas-bold-italic-normal-mono-*-*-*-*-c-*-iso8859-1"))))


;;; start in the home directory. 
(cd "~")


;;; move backups
(setq backup-directory-alist '(("." . "~/.emacs.d/backups/"))
      tramp-backup-directory-alist backup-directory-alist)


;;; scpaste
(autoload 'scpaste "scpaste" "Paste the current buffer." t nil)
(setq scpaste-http-destination "http://jmatt.org/scp"
      scpaste-scp-port "6400"
      scpaste-scp-destination " 173.255.246.199:scp")


(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-safe-themes (quote ("06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "b7553781f4a831d5af6545f7a5967eb002c8daeee688c5cbf33bf27936ec18b3" default))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

Generated by jmatt using scpaste at Thu Jan 3 17:45:52 2013. MST. (original)