summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-12-15 09:49:58 -0800
committerFranck Cuny <franckcuny@gmail.com>2016-12-15 09:49:58 -0800
commit64babd91ee477a7a428990c2c168a7547bfb4557 (patch)
tree2b0451a4611734b24142f0a99719e5ab3ed17608
parentUse 'ido' as the default completion system. (diff)
downloadpants.el-64babd91ee477a7a428990c2c168a7547bfb4557.tar.gz
I think this bury the compilation buffer correctly.
I want to be able to bury the compilation buffer if the compilation
was successfully. Previously, it stayed open, but now it seems to
close. I'll have to check if the `delete-windows` is doing the right
thing, though.
-rw-r--r--pants.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/pants.el b/pants.el
index 7f7619b..9fe23a9 100644
--- a/pants.el
+++ b/pants.el
@@ -116,11 +116,11 @@
   (set (make-local-variable 'compilation-exit-message-function)
        (lambda (status code msg)
          (when (and
-                (eq status 'exit)
+                (equal status 'exit)
                 (zerop code)
-                (and pants-bury-compilation-buffer t)
-                (get-buffer *pants-compilation-buffer*))
-           (bury-buffer))
+                (and pants-bury-compilation-buffer t))
+           (bury-buffer (get-buffer *pants-compilation-buffer*))
+           (delete-window (get-buffer-window (get-buffer *pants-compilation-buffer*))))
          (cons msg code))))
 
 (defun pants--compile (command)