   (add-hook 'emacs-startup-hook 'my/set-gc-threshold)
   (add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
   ;; Auto recompile if compilation window is visible
-  (advice-add 'my/save-buffers :after (lambda () (when (get-buffer-window "*compilation*") (recompile))))
-  (add-hook 'compilation-mode-hook 'my-compilation-hook)
+  (advice-add 'my/save-buffers :after (lambda () (when (get-buffer "*compilation*") (recompile))))
   (add-hook 'prog-mode-hook 'linum-mode))
 
 (defun my/save-buffers ()

 compilation-always-kill t
 compilation-error-regexp-alist nil
 compilation-error-regexp-alist-alist nil
 ;; Open buffers always on bottom
 split-height-threshold nil
 split-width-threshold most-positive-fixnum

            nil
            t))

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
