Only save buffer backed by file in ansi-color-mode

This commit is contained in:
Ivan Malison 2016-06-28 19:46:15 -07:00
parent 3e48836ab7
commit 9a3dae63aa

View File

@ -7,7 +7,8 @@
"Fundamental mode that understands ansi colors."
(require 'ansi-color)
(ansi-color-apply-on-region (point-min) (point-max))
(save-buffer)
(when buffer-file-name
(save-buffer))
(read-only-mode))
(add-to-list 'auto-mode-alist '("\\.ansi_color\\'" . fundamental-ansi-mode))