 ;; ----------------------------------------------------------------------------
 
 (require-package 'auto-compile)
+(require 'auto-compile)
+
 (auto-compile-on-save-mode 1)
 (auto-compile-on-load-mode 1)
 

  (after-load 'flycheck
    (flycheck-package-setup)))

(after-load 'lisp-mode
  (require-package '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.
Pretty-print output into current buffer with `PREFIX'."
  (interactive "P")
  (if (and (mark) (use-region-p))
      (eval-region (min (point) (mark)) (max (point) (mark)))
