-;; required for several packages
+;;; required for several packages
 (require 'cl)
 
-;; package management
+;;; package management
 (require 'package)
 (add-to-list 'package-archives
              '("marmalade" . "http://marmalade-repo.org/packages/") t)

(key-chord-define-global "JJ" 'switch-to-previous-buffer)
(key-chord-mode +1)

;; use DejaVu Sans Mono
(set-frame-font (format "%s-10" "DejaVu Sans Mono"))

;;;; Language specific settings

;; c-mode
(setq c-default-style "stroustrup")

;; clojure-mode
(add-hook 'clojure-mode-hook 'paredit-mode)
(add-hook 'clojure-mode-hook (lambda () (define-clojure-indent
                                     (lazy-seq 'defun)

(add-hook 'nrepl-mode-hook 'paredit-mode)
(add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode)

;;; emacs-lisp-mode
(add-hook 'emacs-lisp-mode-hook 'paredit-mode)
(add-hook 'emacs-lisp-mode-hook 'eldoc-mode)

;;; haskell-mode
(add-hook 'haskell-mode-hook
          (lambda ()
            (setq haskell-font-lock-symbols 'unicode)
