From 9a3dae63aaf0375a5f7bb899856c57eda2ce1911 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 28 Jun 2016 19:46:15 -0700 Subject: [PATCH] Only save buffer backed by file in ansi-color-mode --- dotfiles/emacs.d/load.d/ansi-color-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/load.d/ansi-color-mode.el b/dotfiles/emacs.d/load.d/ansi-color-mode.el index 3d16ae70..69d8cd72 100644 --- a/dotfiles/emacs.d/load.d/ansi-color-mode.el +++ b/dotfiles/emacs.d/load.d/ansi-color-mode.el @@ -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))