kill buffer hook run only for haskell-mode.

This commit is contained in:
Kazu Yamamoto 2015-09-15 11:32:16 +09:00
parent ad5a343d2e
commit ac2d8ba134

View File

@ -214,11 +214,12 @@
(defun ghc-kill-process () (defun ghc-kill-process ()
(interactive) (interactive)
(let* ((name ghc-process-process-name) (when (eq major-mode 'haskell-mode)
(cpro (if name (get-process name)))) (let* ((name ghc-process-process-name)
(if (not cpro) (cpro (if name (get-process name))))
(message "No ghc-mod process") (if (not cpro)
(delete-process cpro) (message "No ghc-mod process")
(message "ghc-mod process was killed")))) (delete-process cpro)
(message "ghc-mod process was killed")))))
(provide 'ghc-process) (provide 'ghc-process)