init-compile.el 731 B

12345678910111213141516171819202122232425
  1. ;;; init-compile.el --- Compilation Configuration File -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;; Based on code from prelude-editor.el
  4. ;;; Code:
  5. (use-feature compile
  6. :custom
  7. (compilation-ask-about-save nil)
  8. (compilation-always-kill t)
  9. (compilation-scroll-output 'first-error))
  10. ;; http://stackoverflow.com/a/3072831/355252
  11. (use-feature ansi-color
  12. :hook
  13. (compilation-filter . (lambda ()
  14. (when (eq major-mode 'compilation-mode)
  15. (let ((inhibit-read-only t))
  16. (ansi-color-apply-on-region (point-min) (point-max)))))))
  17. (use-package winnow
  18. :hook (compilation-mode . winnow-mode))
  19. (provide 'init-compile)
  20. ;;; init-compile.el ends here