about summary refs log blame commit diff stats
path: root/.emacs.d/lisp/init-compile.el
blob: 42a25392c1baeb5b67cacd363663362014c0882e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12




                                                                                 
                    





                                            
                       





                                                                                       


                                         

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

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

;; http://stackoverflow.com/a/3072831/355252
(use-feature 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)))))))

(use-package winnow
  :hook (compilation-mode . winnow-mode))

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