ANSI Coloring in Compilation Mode
问题 Have anyone added support for ansi-color in compilation-mode Emacs? If so what property/attribute does the color-writing program have to check for in order to make sure its active terminal supports ANSI-escape coloring. 回答1: There's already a function for applying color to comint buffers. You simply need to enable it on compilation buffers: (require 'ansi-color) (defun colorize-compilation-buffer () (toggle-read-only) (ansi-color-apply-on-region compilation-filter-start (point)) (toggle-read