Function: TeX-command-sentinel
TeX-command-sentinel is a byte-compiled function defined in tex.el.
Signature
(TeX-command-sentinel PROCESS MSG)
Documentation
Process TeX command output buffer after the PROCESS dies.
Insert MSG with some additional information.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-command-sentinel (process msg)
"Process TeX command output buffer after the PROCESS dies.
Insert MSG with some additional information."
;; Set `TeX-transient-master' here because `preview-parse-messages'
;; may open files and thereby trigger master file questions which we
;; don't want and need because we already know the master. Use
;; `TeX-master-file' instead of `TeX-active-master' to determine the
;; master because the region file should never be the master.
(let* ((TeX-transient-master (TeX-master-file))
(buffer (process-buffer process))
(name (process-name process)))
(cond ((null (buffer-name buffer)) ; buffer killed
(set-process-buffer process nil)
(set-process-sentinel process nil))
((memq (process-status process) '(signal exit))
(with-current-buffer buffer
;; Append post-mortem information to the buffer
(goto-char (point-max))
(insert-before-markers "\n" mode-name " " msg)
(forward-char -1)
(insert " at "
(substring (current-time-string) 0 -5))
(forward-char 1)
;; Do command specific actions.
(TeX-command-mode-line process)
(setq TeX-command-next TeX-command-Show)
(goto-char (point-min))
(apply TeX-sentinel-function process name nil)
;; If 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 process))
;; Force mode line redisplay soon
;; Do this in all buffers (bug#38058 and bug#40965)
(force-mode-line-update t))))
(setq compilation-in-progress (delq process compilation-in-progress)))