From 2f7171bf8a5f76c1fbb3b9c91921be270b09c0b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 17 Jun 2022 15:27:10 +0200 Subject: [PATCH] refactor(lib): remove doom-apply-ansi-color-to-compilation-buffer-h Is redundant with ansi-color-compilation-filter. Ref: aec4fbe590dc --- core/autoload/ui.el | 7 ------- core/core-ui.el | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 9aa8e3756..43e500e89 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -55,13 +55,6 @@ In tty Emacs, messages are suppressed completely." ;; ;;; Hooks -;;;###autoload -(defun doom-apply-ansi-color-to-compilation-buffer-h () - "Applies ansi codes to the compilation buffers. Meant for -`compilation-filter-hook'." - (with-silent-modifications - (ansi-color-apply-on-region compilation-filter-start (point)))) - ;;;###autoload (defun doom-disable-show-paren-mode-h () "Turn off `show-paren-mode' buffer-locally." diff --git a/core/core-ui.el b/core/core-ui.el index 586e9df4e..b9014562d 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -333,8 +333,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq compilation-always-kill t ; kill compilation process before starting another compilation-ask-about-save nil ; save all buffers on `compile' compilation-scroll-output 'first-error) - ;; Handle ansi codes in compilation buffer - (add-hook 'compilation-filter-hook #'doom-apply-ansi-color-to-compilation-buffer-h) + ;; Handle ansi codes in compilation buffers + (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter) ;; Automatically truncate compilation buffers so they don't accumulate too ;; much data and bog down the rest of Emacs. (autoload 'comint-truncate-buffer "comint" nil t)