diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 68e0ca8..c0b184e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -188,6 +188,13 @@ Argument REGEX will be used to set `outline-regexp' for this buffer." (interactive) (server-save-buffers-kill-terminal nil)) +(defun oni:compilation-finish-function (buffer str) + "Don't show compilation window if everything went OK." + (unless (string-match-p "exited abnormally" str) + ;;(run-at-time 0.5 nil 'delete-windows-on buffer) + (delete-windows-on buffer) + (message "Compilation successful"))) + (defun oni:compile-el () "Compile the current buffer file if it is an .el file." (let* ((full-file-name (buffer-file-name)) @@ -1062,6 +1069,9 @@ for easy selection." (add-to-list 'auto-mode-alist '("^PKGBUILD$" . shell-script-mode)) (add-to-list 'auto-mode-alist '("^\\.Xmodmap$" . xmodmap-mode)) +(add-to-list 'compilation-finish-functions + 'oni:compilation-finish-function) + (add-to-list 'custom-theme-load-path (concat custom-theme-directory "/naquadah-theme"))