C-cC-k kills a process.

This commit is contained in:
Kazu Yamamoto 2014-03-30 11:54:17 +09:00
parent 2db2358a98
commit a47d77fb2f
2 changed files with 11 additions and 0 deletions

View File

@ -86,4 +86,13 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-kill-process ()
(interactive)
(let* ((name ghc-process-process-name)
(cpro (if name (get-process name))))
(if (not cpro)
(message "No process")
(delete-process cpro)
(message "A process was killed"))))
(provide 'ghc-process)

View File

@ -50,6 +50,7 @@
(defvar ghc-toggle-key "\C-c\C-c")
(defvar ghc-module-key "\C-c\C-m")
(defvar ghc-expand-key "\C-c\C-e")
(defvar ghc-kill-key "\C-c\C-k")
(defvar ghc-hoogle-key (format "\C-c%c" (ghc-find-C-h)))
(defvar ghc-shallower-key "\C-c<")
(defvar ghc-deeper-key "\C-c>")
@ -80,6 +81,7 @@
(define-key haskell-mode-map ghc-check-key 'ghc-save-buffer)
(define-key haskell-mode-map ghc-toggle-key 'ghc-toggle-check-command)
(define-key haskell-mode-map ghc-module-key 'ghc-insert-module)
(define-key haskell-mode-map ghc-kill-key 'ghc-kill-process)
(define-key haskell-mode-map ghc-hoogle-key 'haskell-hoogle)
(define-key haskell-mode-map ghc-shallower-key 'ghc-make-indent-shallower)
(define-key haskell-mode-map ghc-deeper-key 'ghc-make-indent-deeper)