   (after-load 'flycheck
     (flycheck-package-setup)))
 
+(require 'lisp-mode)
+
 (after-load 'lisp-mode
   (require-package 'compile)
+  (require 'compile)
 
   ;; this means hitting the compile button always saves the buffer
   ;; having to separately hit C-x C-s is a waste of time

;; Make C-x C-e run 'eval-region if the region is active

(defun sanityinc/eval-last-sexp-or-region (prefix)
  "Eval region from BEG to END if active, otherwise the last sexp."
  (interactive "P")
  (if (and (mark) (use-region-p))
      (eval-region (min (point) (mark)) (max (point) (mark)))

;; ----------------------------------------------------------------------------

(require-package 'auto-compile)
(require 'auto-compile)

(auto-compile-on-save-mode 1)
(auto-compile-on-load-mode 1)

