Function: majutsu--process-sentinel

majutsu--process-sentinel is a natively compiled function defined in majutsu-process.el.

Signature

(majutsu--process-sentinel PROCESS EVENT)

Documentation

Default sentinel used by majutsu-start-process.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-process.el
(defun majutsu--process-sentinel (process _event)
  "Default sentinel used by `majutsu-start-process'."
  (when (memq (process-status process) '(exit signal))
    (majutsu-process-finish process)
    (unless (process-get process 'inhibit-refresh)
      (let ((command-buf (process-get process 'command-buf))
            (default-dir (process-get process 'default-dir)))
        (if (buffer-live-p command-buf)
            (with-current-buffer command-buf
              (let ((default-directory (or default-dir default-directory)))
                (majutsu-refresh)))
          (when (and default-dir (fboundp 'majutsu-log-refresh))
            (when-let* ((buffer (majutsu--find-mode-buffer 'majutsu-log-mode default-dir)))
              (with-current-buffer buffer
                (ignore-errors (majutsu-log-refresh))))))))))