forked from colonelpanic/dotfiles
[Emacs] Clean up colorize compilation buffers
This commit is contained in:
parent
c4dbbc7ad2
commit
bad69f6164
@ -4313,15 +4313,17 @@ Set the character used to represent spaces to ·, and the character used for tab
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Colorize Compliation Buffers
|
** Colorize Compliation Buffers
|
||||||
This automatically applies ansi-color interpretation of terminal escape sequences to compilation buffers
|
This automatically applies ansi-color interpretation of terminal escape
|
||||||
|
sequences to compilation buffers.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun colorize-compilation-buffer ()
|
(defun colorize-compilation-buffer ()
|
||||||
(read-only-mode)
|
(let ((was-read-only read-only-mode))
|
||||||
(ansi-color-apply-on-region (point-min) (point-max))
|
(when was-read-only (read-only-mode -1))
|
||||||
(read-only-mode))
|
(ansi-color-apply-on-region (point-min) (point-max))
|
||||||
|
(when was-read-only (read-only-mode +1))))
|
||||||
|
|
||||||
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Automatic Theme Changer
|
** Automatic Theme Changer
|
||||||
Disabled for now
|
Disabled for now
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
Loading…
Reference in New Issue
Block a user