From b908dd8a5b54c14f5b86e00439444ae721d5a5e0 Mon Sep 17 00:00:00 2001 From: Jay Bosamiya Date: Mon, 24 Jun 2019 19:17:24 -0700 Subject: [PATCH] Prevent teardown if in an indirect buffer When F* is in an indirect buffer, then killing the indirect buffer causes the base buffer to also undergo a teardown. This commit makes sure to check whether we are actually in the right buffer, before initiating a teardown, thereby preventing spurious teardowns. --- fstar-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fstar-mode.el b/fstar-mode.el index a6b4896..c178a2d 100755 --- a/fstar-mode.el +++ b/fstar-mode.el @@ -5511,7 +5511,8 @@ its `find-image' forms." (defun fstar-teardown () "Run all teardown functions." - (fstar-run-module-functions 'teardown)) + (unless (buffer-base-buffer) + (fstar-run-module-functions 'teardown))) (defun fstar-setup-hooks () "Setup hooks required by F*-mode."