diff --git a/dotfiles/emacs.d/ansi-color-mode.el b/dotfiles/emacs.d/ansi-color-mode.el new file mode 100644 index 00000000..498e982c --- /dev/null +++ b/dotfiles/emacs.d/ansi-color-mode.el @@ -0,0 +1,11 @@ +(defun ansi-color-apply-on-region-int (beg end) + "interactive version of func" + (interactive "r") + (ansi-color-apply-on-region beg end)) + +(define-derived-mode fundamental-ansi-mode fundamental-mode "fundamental ansi" + "Fundamental mode that understands ansi colors." + (require 'ansi-color) + (ansi-color-apply-on-region (point-min) (point-max))) + +(add-to-list 'auto-mode-alist '("\\.ansi_color\\'" . fundamental-ansi-mode))