Function: term-handle-exit
term-handle-exit is a byte-compiled function defined in term.el.gz.
Signature
(term-handle-exit PROCESS-NAME MSG)
Documentation
Write process exit (or other change) message MSG in the current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-handle-exit (process-name msg)
"Write process exit (or other change) message MSG in the current buffer."
(let ((buffer-read-only nil)
(omax (point-max))
(opoint (point)))
;; Remove hooks to avoid errors due to dead process.
(remove-hook 'pre-command-hook #'term-set-goto-process-mark t)
(remove-hook 'post-command-hook #'term-goto-process-mark-maybe t)
;; Record where we put the message, so we can ignore it
;; later on.
(goto-char omax)
(insert ?\n "Process " process-name " " msg)
;; Force mode line redisplay soon.
(force-mode-line-update)
(when (and opoint (< opoint omax))
(goto-char opoint))))