              '("melpa" . "http://melpa.milkbox.net/packages/") t)
 (package-initialize)
 
-;;  (package-install 'bind-key))
-(require 'bind-key)
+(if (not (package-installed-p 'use-package))
+    (progn
+      (package-refresh-contents)
+      (package-install 'use-package)))
+(require 'use-package)
+
+(use-package bind-key
+  :ensure bind-key)
 
 ;; From http://pages.sachachua.com/.emacs.d/Sacha.html#sec-1-7-3
 ;; Transpose stuff with M-t

(setq-default indent-tabs-mode nil)

;; Automatically closes brackets.
(unless (fboundp 'smartparens-mode)
  (package-install 'smartparens))
(require 'smartparens)
(smartparens-global-mode)
(show-smartparens-global-mode +1)
(electric-indent-mode)

;; Partially use path in buffer name.
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)

;; Get rid of splash screens.

;; Choose a theme.
;; https://github.com/bbatsov/zenburn-emacs
;; Requires: color-theme (install from melpa).
(use-package color-theme
  :ensure color-theme)
(load "~/.emacs.d/downloads/molokai/color-theme-molokai.el")
(color-theme-molokai)
;;(load "~/.emacs.d/downloads/zenburn/zenburn-theme.el")
