about summary refs log blame commit diff stats
path: root/.emacs.d/lisp/init-compile.el
blob: dd3851012c5dacb85c2d48b9a7a7a2fa3e387e9e (plain) (tree)





















                                                                                       
;;; init-compile.el --- Compilation Configuration File -*- lexical-binding: t -*-
;;; Commentary:
;; Based on code from prelude-editor.el
;;; Code:

(use-package compile
  :ensure nil
  :custom
  (compilation-ask-about-save nil)
  (compilation-always-kill t)
  (compilation-scroll-output 'first-error))

;; http://stackoverflow.com/a/3072831/355252
(use-package ansi-color
  :hook
  (compilation-filter . (lambda ()
                          (when (eq major-mode 'compilation-mode)
                            (let ((inhibit-read-only t))
                              (ansi-color-apply-on-region (point-min) (point-max)))))))

(provide 'init-compile)
;;; init-compile.el ends here