# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1454365854 18000
# Node ID c35759aceed4138a6a609f455b9989f70e048a39
# Parent  cf3b1ba01e692b00d78838ce8b372652843994e4
emacs: add a hook to handle ANSI colors in compilation buffers

Some tools just blindly assume they're printing to a color-supporting
terminal. Since fixing them is probably impractical, we'll just work around
their stupidity.

diff --git a/.elisp/settings/99.compilation-ansi-color.el b/.elisp/settings/99.compilation-ansi-color.el
new file mode 100644
--- /dev/null
+++ b/.elisp/settings/99.compilation-ansi-color.el
@@ -0,0 +1,4 @@
+;;; handle ansi color output in compilation buffer
+(eval-after-load 'compile
+  '(add-hook 'compilation-filter-hook
+        (lambda () (ansi-color-process-output nil))))