Function: majutsu--process-setup

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

Signature

(majutsu--process-setup PROCESS SECTION ROOT SENTINEL)

Documentation

Attach Majutsu bookkeeping to PROCESS for SECTION under ROOT.

SENTINEL becomes the process sentinel. SECTION may be a placeholder that is not a magit-section(var)/magit-section(fun), in which case the section slots are left unset.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-process.el
(defun majutsu--process-setup (process section root sentinel)
  "Attach Majutsu bookkeeping to PROCESS for SECTION under ROOT.
SENTINEL becomes the process sentinel.  SECTION may be a placeholder that
is not a `magit-section', in which case the section slots are left unset."
  (set-process-query-on-exit-flag process nil)
  (process-put process 'section section)
  (process-put process 'command-buf (current-buffer))
  (process-put process 'default-dir root)
  (when (magit-process-section-p section)
    (oset section process process)
    (oset section value process))
  (with-current-buffer (process-buffer process)
    (set-marker (process-mark process) (point)))
  (majutsu--process-install-filter process)
  (set-process-sentinel process sentinel)
  process)