Colorize ANSI colour sequences in compilation buffer.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 26 Dec 2013 19:24:16 +0200
changeset 1098 ac3d34a14b99
parent 1097 cd0db89610b4
child 1099 ca26bcd6e73b
Colorize ANSI colour sequences in compilation buffer.
.emacs-my
--- a/.emacs-my	Sun Dec 22 23:06:32 2013 +0200
+++ b/.emacs-my	Thu Dec 26 19:24:16 2013 +0200
@@ -2131,6 +2131,13 @@
        )
      ))
 
+(ignore-errors
+  (require 'ansi-color)
+  (defun my-colorize-compilation-buffer ()
+    (when (eq major-mode 'compilation-mode)
+      (ansi-color-apply-on-region compilation-filter-start (point-max))))
+  (add-hook 'compilation-filter-hook 'my-colorize-compilation-buffer))
+
 (defvar my-comint-send-hist-list nil
   "History list for `my-comint-send-string'."
   )