mirror of
https://github.com/correl/dotfiles.git
synced 2024-12-18 11:06:17 +00:00
[emacs] Support ANSI colors in compilation buffers
This commit is contained in:
parent
8bb7f8c5bd
commit
ce3b14d991
1 changed files with 13 additions and 0 deletions
|
@ -1052,6 +1052,19 @@ Because typing out "yes" and "no" is irritating.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defalias 'yes-or-no-p #'y-or-n-p)
|
(defalias 'yes-or-no-p #'y-or-n-p)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** Support ANSI colors in compilation buffers
|
||||||
|
|
||||||
|
http://stackoverflow.com/a/13408008
|
||||||
|
|
||||||
|
#+name: other
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(require 'ansi-color)
|
||||||
|
(defun colorize-compilation-buffer ()
|
||||||
|
(toggle-read-only)
|
||||||
|
(ansi-color-apply-on-region compilation-filter-start (point))
|
||||||
|
(toggle-read-only))
|
||||||
|
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
||||||
|
#+END_SRC
|
||||||
* Custom settings
|
* Custom settings
|
||||||
Store options set via =customize-*= in a separate file (Emacs stores
|
Store options set via =customize-*= in a separate file (Emacs stores
|
||||||
them in =init.el= by default).
|
them in =init.el= by default).
|
||||||
|
|
Loading…
Reference in a new issue