adding kill-buffer-hook.

This commit is contained in:
Kazu Yamamoto 2015-09-10 13:07:17 +09:00
parent 0277d44695
commit 983059101c

View File

@ -117,6 +117,7 @@
(define-key haskell-mode-map ghc-next-hole-key 'ghc-goto-next-hole) (define-key haskell-mode-map ghc-next-hole-key 'ghc-goto-next-hole)
(ghc-comp-init) (ghc-comp-init)
(setq ghc-initialized t) (setq ghc-initialized t)
(add-hook 'kill-buffer-hook 'ghc-kill-process)
(defadvice save-buffer (after ghc-check-syntax-on-save activate) (defadvice save-buffer (after ghc-check-syntax-on-save activate)
"Check syntax with GHC when a haskell-mode buffer is saved." "Check syntax with GHC when a haskell-mode buffer is saved."
(when (eq 'haskell-mode major-mode) (ghc-check-syntax)))) (when (eq 'haskell-mode major-mode) (ghc-check-syntax))))