Function: mpc-proc-sync
mpc-proc-sync is a byte-compiled function defined in mpc.el.gz.
Signature
(mpc-proc-sync &optional PROC)
Documentation
Wait for MPC process until it is idle again.
Return the buffer in which the process is/was running.
Source Code
;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-proc-sync (&optional proc)
"Wait for MPC process until it is idle again.
Return the buffer in which the process is/was running."
(unless proc (setq proc (mpc-proc)))
(unwind-protect
(progn
(while (and (not (process-get proc 'ready))
(accept-process-output proc)))
(mpc-proc-check proc)
(if (process-get proc 'ready) (process-buffer proc)
(error "No response from MPD")))
(unless (process-get proc 'ready)
;; (debug)
(message "Killing hung process")
(delete-process proc))))