From b82f420f182caf1ec3cff4cbff104d22f8cd3b33 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 12 Nov 2018 14:33:41 +0900 Subject: [PATCH] Fix bug --- emacs.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index 4ebc3b2..f04ab3e 100644 --- a/emacs.el +++ b/emacs.el @@ -2019,10 +2019,12 @@ DISPLAY non-nil means redisplay buffer as output is inserted." (defun awk-preview--cleanup() "Cleanup awk preview buffers and variables." - (kill-buffer (awk-preview--env-preview-buffer awk-preview--env)) - ;; TODO: Ask if it should be killed - (kill-buffer (awk-preview--env-program-buffer awk-preview--env)) - (setf (awk-preview--env-running-p awk-preview--env) nil) + (with-current-buffer (awk-preview--env-source-buffer awk-preview--env) + (cl-assert awk-preview--env) + (kill-buffer (awk-preview--env-preview-buffer awk-preview--env)) + ;; TODO: Ask if it should be killed + (kill-buffer (awk-preview--env-program-buffer awk-preview--env)) + (setf (awk-preview--env-running-p awk-preview--env) nil)) (set-window-configuration (awk-preview--env-window-configuration awk-preview--env))) (defvar awk-preview-program-mode-map