Function: term-sentinel
term-sentinel is a byte-compiled function defined in term.el.gz.
Signature
(term-sentinel PROC MSG)
Documentation
Sentinel for term buffers.
The main purpose is to get rid of the local keymap.
Source Code
;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-sentinel (proc msg)
"Sentinel for term buffers.
The main purpose is to get rid of the local keymap."
(let ((buffer (process-buffer proc)))
(when (memq (process-status proc) '(signal exit))
(if (null (buffer-name buffer))
;; buffer killed
(set-process-buffer proc nil)
(with-current-buffer buffer
;; Write something in the compilation buffer
;; and hack its mode line.
;; Get rid of local keymap.
(use-local-map nil)
(term-handle-exit (process-name proc) msg)
;; Since the buffer and mode line will show that the
;; process is dead, we can delete it now. Otherwise it
;; will stay around until M-x list-processes.
(delete-process proc))))))