allow to interrupt and kill utop in emacs
Ignore-this: 9ee0deb47932d7baf7084ae8025a2f31 darcs-hash:20120202140753-c41ad-8f877a7d2c9debfc56efee729cdcdab8fcc18596
This commit is contained in:
parent
72c35f5518
commit
c1ff52459d
|
@ -421,6 +421,20 @@ sub-process."
|
|||
(goto-char utop-prompt-max)
|
||||
(move-beginning-of-line 1))))
|
||||
|
||||
;; +-----------------------------------------------------------------+
|
||||
;; | Process control |
|
||||
;; +-----------------------------------------------------------------+
|
||||
|
||||
(defun utop-interrupt ()
|
||||
"Interrupt utop."
|
||||
(interactive)
|
||||
(interrupt-process utop-process))
|
||||
|
||||
(defun utop-kill ()
|
||||
"Kill utop."
|
||||
(interactive)
|
||||
(kill-process utop-process))
|
||||
|
||||
;; +-----------------------------------------------------------------+
|
||||
;; | The mode |
|
||||
;; +-----------------------------------------------------------------+
|
||||
|
@ -466,6 +480,9 @@ sub-process."
|
|||
(define-key utop-mode-map [(meta ?p)] 'utop-history-goto-prev)
|
||||
(define-key utop-mode-map [(meta ?n)] 'utop-history-goto-next)
|
||||
(define-key utop-mode-map [tab] 'utop-complete)
|
||||
(define-key utop-mode-map [(control ?c) (control ?c)] 'utop-interrupt)
|
||||
(define-key utop-mode-map [(control ?c) (control ?i)] 'utop-interrupt)
|
||||
(define-key utop-mode-map [(control ?c) (control ?k)] 'utop-kill)
|
||||
|
||||
;; Register the exit hook
|
||||
(add-hook 'kill-buffer-hook (lambda () (run-hooks 'utop-exit-hook)) t t)
|
||||
|
|
Loading…
Reference in New Issue