Function: magit-todos--async-start-process
magit-todos--async-start-process is a natively compiled function
defined in magit-todos.el.
Signature
(magit-todos--async-start-process NAME &key COMMAND FINISH-FUNC)
Documentation
Start the executable COMMAND asynchronously. See async-start.
PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the process object when done. If FINISH-FUNC is nil, the future object will return the process object when the program is finished. Set DEFAULT-DIRECTORY to change PROGRAM's current working directory. Process is named NAME.
This is a copy of async-start-process that does not override
process-connection-type. It also uses keyword arguments.
Source Code
;; Defined in /nix/store/xy37aj9089qvbs5clw0qszpi3hrh3mxx-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-todos-20250928.1611/magit-todos.el
(cl-defun magit-todos--async-start-process (name &key command finish-func)
"Start the executable COMMAND asynchronously. See `async-start'.
PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the
process object when done. If FINISH-FUNC is nil, the future
object will return the process object when the program is
finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
working directory. Process is named NAME.
This is a copy of `async-start-process' that does not override
`process-connection-type'. It also uses keyword arguments."
(declare (indent defun))
;; TODO: Drop this function when possible. See
;; <https://github.com/jwiegley/emacs-async/issues/102>.
(let* ((args (cdr command))
(command (car command))
(buf (generate-new-buffer (concat " *" name "*")))
(proc (apply #'start-file-process name buf command args)))
(with-current-buffer buf
(set-process-query-on-exit-flag proc nil)
(set (make-local-variable 'async-callback) finish-func)
(set-process-sentinel proc #'magit-todos--async-when-done)
(unless (string= name "emacs")
(set (make-local-variable 'async-callback-for-process) t))
proc)))