From 791d7fd3a2fe6ae4407fe6fe9f2ea86e84dd315c Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 17 Feb 2013 22:23:36 +0100 Subject: emacs: Close compilation buffer on success --- .emacs.d/site-lisp/ext.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.emacs.d/site-lisp') diff --git a/.emacs.d/site-lisp/ext.el b/.emacs.d/site-lisp/ext.el index 2ed65d4..d6abaa6 100644 --- a/.emacs.d/site-lisp/ext.el +++ b/.emacs.d/site-lisp/ext.el @@ -38,6 +38,15 @@ buffer-file-name)))) (list "pycheck.sh" (list local-file)))) +(defun ext:comp-finish-function (buf str) + "Don't show compilation window if everything went ok" + (if (string-match "exited abnormally" str) + ;; there were errors + (message "compilation errors, press C-x ` to visit") + ;; no errors, make the compilation window go away in 0.5 seconds + (run-at-time 0.5 nil 'delete-windows-on buf) + (message "No compilation errors!"))) + (defun ext:reload-buffer () "Reload current buffer." (interactive) -- cgit v1.2.3-54-g00ecf