   (package-install 'use-package))
 (require 'use-package)
 (setq use-package-verbose t)
-
-;; We need this function earlier
-(defun call-and-go-to-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

  (interactive)
  (call-on-buffer 'query-replace-regexp))

(defun projectile-recentf-or-find-file ()
  "Call 'projectile-recentf' if there are recent files, else 'projectile-find-file'."
  (interactive)
  (let ((files (projectile-recentf-files)))
    (if (> (length files) 0)
        (projectile-recentf)
      (projectile-find-file))))

(defun my-projectile-switch-project-action ()
  "Projectile default action when switching projects."
  (interactive)
  (projectile-recentf-or-find-file)
  (call-and-go-to-previous-buffer 'treemacs-select-window))

(defun cider-namespace-refresh ()
  "Call 'clojure.tools.namespace.repl/refresh'."
  (interactive)

   ([remap zap-up-to-char] . zop-up-to-char)))

;; Functions
(defun call-and-go-to-previous-buffer (func)
  "Call FUNC then go to the previous buffer."
  (interactive)
  (let ((buffer (current-buffer)))
    (call-interactively func)
    (pop-to-buffer buffer)))

(defun cider-toggle-show-repl ()
  "Toggle to show repl."
  (interactive)
