summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index f16d1ea..ed1a017 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -299,12 +299,13 @@
(defun compile-autoclose (buffer string)
"Close compilation window on success"
- (cond ((and (string-match "compilation" (buffer-name buffer))
- (string-match "finished" string))
- (bury-buffer "*compilation*")
- (message "Build successful."))
- (t
- (message "Compilation exited abnormally: %s" string))))
+ (if (and (string-match "compilation" (buffer-name buffer))
+ (string-match "finished" string))
+ (progn
+ (switch-to-prev-buffer (get-buffer-window buffer) 'bury)
+ (bury-buffer buffer)
+ (message "Compilation successful"))
+ (message "Compilation exited abnormally: %s" string)))
(defun rotate-windows ()
"Rotate windows"