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