                 (define-key company-active-map (kbd "M-p") nil)
                 (define-key company-active-map (kbd "M-n") nil)))))
 
-;;;; Package: Company Statistics
-;; Sorts Company completions by usage. Persistent between Emacs sessions.
-;;;;
-
 (when (member 'company-statistics radian-packages)
 
   ;;; Turn on company-statistics.
   (company-statistics-mode 1))
 
-;;;; Package: Markdown TOC
-;; Generates tables of contents for Markdown files.
-;;;;
-
-(when (member 'markdown-toc radian-packages)
-
-  ;; Remove the header inserted before the table of contents. If you want a
-  ;; header, just add one before the "markdown-toc start" comment -- this way,
-  ;; you can have different header styles in different documents.
-  (setq markdown-toc-header-toc-title ""))
-
-;;;; Package: ElDoc
-;; Automatically shows the signature of the function at point in the echo
-;; area. Also works with variables, for which the first line of the docstring
-;; is shown.
-;;;;
-
-;;; Enable ElDoc when editing Lisps and using Lisp REPLs.
-
-(dolist (hook '(emacs-lisp-mode-hook
-                lisp-interaction-mode-hook))
-  (add-hook hook (lambda () (eldoc-mode 1))))
-
-(when (member 'clojure-mode radian-packages)
-  (add-hook 'clojure-mode-hook (lambda () (eldoc-mode 1))))
-
-(when (member 'cider radian-packages)
-  (add-hook 'cider-repl-mode-hook (lambda () (eldoc-mode 1))))
-
-;;; Turn off the delay before ElDoc messages are shown in the echo area.
-(setq eldoc-idle-delay 0)
-
-;;; Always truncate ElDoc messages to one line. This prevents the echo area from
-;;; resizing itself unexpectedly when point is on a Clojure variable with a
-;;; multiline docstring.
-(setq eldoc-echo-area-use-multiline-p nil)
-
-;;;; Package: Clojure mode
-;; Provides indentation and syntax highlighting for Clojure and
-;; ClojureScript files.
-;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Package: Aggressive Indent
+
+(when (member 'aggressive-indent radian-packages)
+
+  ;;; Enable Aggressive Indent (almost) everywhere.
+  (global-aggressive-indent-mode 1)
+
+  ;;; Disable Aggressive Indent in Re-Builder mode. I don't think it
+  ;;; does anything in this mode, and it shadows the C-c C-q binding
+  ;;; provided by Re-Builder (so you can't quit!).
+  (add-to-list 'aggressive-indent-excluded-modes 'reb-mode))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Package: Paredit
+
+(when (member 'paredit radian-packages)
+
+  ;;; Enable Paredit when editing Lisps and using Lisp REPLs.
+
+  (dolist (hook '(emacs-lisp-mode-hook
+                  lisp-interaction-mode-hook
+                  scheme-mode-hook))
+    (add-hook hook 'enable-paredit-mode))
+
+  (when (member 'clojure-mode radian-packages)
+    (add-hook 'clojure-mode-hook 'enable-paredit-mode))
+
+  (when (member 'cider radian-packages)
+    (add-hook 'cider-repl-mode-hook 'enable-paredit-mode))
+
+  (when (member 'geiser radian-packages)
+    (add-hook 'geiser-repl-mode-hook 'enable-paredit-mode)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Package: clojure-mode
 
 (when (member 'clojure-mode radian-packages)
 

;;; Make the installed packages available.
(provide 'radian-packages)

;;;; User-specific configuration (3 of 4).
(radian-load-user-config "init.post.local.el")

;;;; Package: Ace Jump Mode
;; Allows quickly jumping to an arbitrary word, character, or line.
;;;;

(when (member 'ace-jump-mode radian-packages)

  ;; Clojure mode already binds C-c SPC to clojure-align, so use C-c C-SPC
  ;; instead.
  (global-set-key (kbd "C-c C-SPC") 'ace-jump-mode))

;;;; Package: Windmove
;; Allows switching to adjacent windows using shift + arrow keys.
;;;;

(windmove-default-keybindings)

;;;; Package: Winner Mode
;; Allows navigating through window layout history using C-c <left> and C-c <right>.
;;;;

(winner-mode 1)

;;;; Package: Undo Tree
;; Replaces Emacs' default redo-as-undo behavior with a more sensible undo/redo
;; tree, which can be visualized in complex situations.
;;;;

(when (member 'undo-tree radian-packages)

  ;;; Turn on Undo Tree everywhere.
  (global-undo-tree-mode 1)

  ;;; Override the default binding of M-/ to dabbrev-expand.
  (global-set-key (kbd "M-/") 'undo-tree-redo)

  ;;; Make undo history persistent between Emacs sessions.
  (setq undo-tree-auto-save-history t)

  ;;; Put all the undo information in a single directory.
  (setq undo-tree-history-directory-alist '(("." . "~/.emacs-undos"))))

;;;; Package: IDO
;; Makes completion more intelligent by using fuzzy matching and better
;; keybindings.
;;;;

;;; Use IDO mode for C-x C-f and friends. (Most other things should be
;;; using Helm mode.)
(ido-mode 'files)

;;; Use fuzzy matching.
(setq ido-enable-flex-matching 1)

;;;; Package: Projectile
;; Enables quickly jumping to any file in a project by filename, or
;; jumping to files in previously visited projects.
;;
;; http://projectile.readthedocs.io/en/latest/
;;;;

(when (member 'projectile radian-packages)

  ;;; Enable Projectile everywhere.
  (projectile-global-mode 1))

;;;; Package: Helm
;; Shows completions for switching to files and buffers in a separate,
;; easy-to-navigate buffer.
;;;;

(when (member 'helm radian-packages)


                (replace-match (clojure-docstring-fill-prefix))))
          (lisp-indent-line))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Package: CIDER

(when (member 'cider radian-packages)

