   (package-install 'use-package))
 (require 'use-package)
 (setq use-package-verbose t)
+
+;; We need this function earlier
+(defun call-func-and-previous-buffer (func)
+  "Call FUNC then go to the previous buffer."
+  (interactive)
+  (let ((buffer (current-buffer)))
+    (call-interactively func)
+    (pop-to-buffer buffer)))
 
 ;; Package list
 (use-package abbrev

  :bind
  ("C-s" . swiper))

(use-package undo-tree
  :ensure t
  :config

(defun cider-show-repl-buffer ()
  "Show cider repl buffer."
  (interactive)
  (call-func-and-previous-buffer 'cider-switch-to-repl-buffer))

(defun clojure-jack-in ()
  "Start the repl if there is no current connection."
