Make compilation-mode use ansi-color escapes

This commit is contained in:
Adam Goldsmith 2017-09-21 03:28:13 -04:00
parent 1ec4ab9eea
commit f7a3f02ed6
1 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,14 @@
("C-S-z" . compile))
:config
(setq compilation-scroll-output 'first-error)
(require 'ansi-color)
(add-hook 'compilation-filter-hook
(lambda ()
(toggle-read-only 0)
(ansi-color-apply-on-region compilation-filter-start (point))
(toggle-read-only 1)))
(add-hook 'compilation-start-hook
(lambda (x) (setq-local scroll-up-aggressively 0.0))))