(setq-default compilation-scroll-output t)

(require-package 'alert)

;; Customize `alert-default-style' to get messages after compilation

(defun sanityinc/alert-after-compilation-finish (buf result)
  "Use `alert' to report compilation RESULT if BUF is hidden."
  (unless (catch 'is-visible
            (walk-windows (lambda (w)
                            (when (eq (window-buffer w) buf)
                              (throw 'is-visible t)))))
    (alert (concat "Compilation " result)
           :buffer buf
           :category 'compilation)))

(after-load 'compile
  (add-hook 'compilation-finish-functions
            'sanityinc/alert-after-compilation-finish))


(provide 'init-compile)

(setq-default compilation-scroll-output t)

(require-package 'alert)

;; Customize `alert-default-style' to get messages after compilation

(defun sanityinc/alert-after-compilation-finish (buf result)
  "Use `alert' to report compilation RESULT if BUF is hidden."
  (unless (catch 'is-visible
            (walk-windows (lambda (w)
                            (when (eq (window-buffer w) buf)
                              (throw 'is-visible t))))
            nil)
    (alert (concat "Compilation " result)
           :buffer buf
           :category 'compilation)))

(after-load 'compile
  (add-hook 'compilation-finish-functions
            'sanityinc/alert-after-compilation-finish))


(provide 'init-compile)

Make block result explicit when not "throw"-ing
Make block result explicit when not "throw"-ing

purcell/emacs.d,benkha/emacs.d,atreeyang/emacs.d,farzadbekran/emacs.d,svenyurgensson/emacs.d,blueseason/emacs.d,gsmlg/emacs.d,farzadbekran/emacs.d,dcorking/emacs.d,blueabysm/emacs.d,mpwang/emacs.d,ernest-dzf/emacs.d,Togal/emacs.d,carlosliu/emacs.d,alant/emacs.d,renatoriccio/emacs.d,jthetzel/emacs.d,bibaijin/emacs.d,LittleLmp/emacs.d,boblannon/emacs.d,wenpincui/emacs.d,modkzs/emcs.d,baohaojun/emacs.d,me020523/emacs.d,lujianmei/emacs.d,lust4life/emacs.d,kongfy/emacs.d,jachinpy/emacs.d,emuio/emacs.d,jkaessens/emacs.d,jhpx/emacs.d,cjqw/emacs.d,LKI/emacs.d,Enzo-Liu/emacs.d,scorpionis/emacs.d,DarkThrone/emacs.d,farzadbekran/emacs.d,fengxl/emacs.d,dhanunjaya/emacs.d,pairyo/emacs.d,zhuoyikang/emacs.d,zenith-john/emacs.d,roxolan/emacs.d,Werewolflsp/emacs.d,ilove0518/emacs.d,caoyuanqi/emacs.d,dongdonghu/.emacs.d,krzysz00/emacs.d,braveoyster/emacs.d,Guoozz/emacs.d,cyjia/emacs.d,qianwan/emacs.d,mmqmzk/emacs.d,shafayetkhan/emacs.d,hophacker/emacs.d,kindoblue/emacs.d,jachinpy/emacs.d,whizzzkid/emacs.d,wegatron/emacs.d,Jadecity/PurcellEmacs.d,lromang/emacs.d,sgarciac/emacs.d,danfengcao/emacs.d,haodaivshen/emacs.d,zhaotai/.emacs.d,46do14/emacs.d,Shanicky/emacs.d,hkcqr/emacs.d,arthurl/emacs.d,exclamaforte/emacs.d,farzadbekran/emacs.d,farzadbekran/emacs.d,qinshulei/emacs.d