Function: mpc-play

mpc-play is an interactive and byte-compiled function defined in mpc.el.gz.

Signature

(mpc-play)

Documentation

Start playing whatever is selected.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-play ()
  "Start playing whatever is selected."
  (interactive)
  (if (member (cdr (assq 'state (mpc-cmd-status))) '("pause"))
      (mpc-resume)
    ;; When playing the playlist ends, the playlist isn't cleared, but the
    ;; user probably doesn't want to re-listen to it before getting to
    ;; listen to what he just selected.
    ;; (if (member (cdr (assq 'state (mpc-cmd-status))) '("stop"))
    ;;     (mpc-cmd-clear))
    ;; Actually, we don't use mpc-play to append to the playlist any more,
    ;; so we can just always empty the playlist.
    (mpc-cmd-clear)
    (if (mpc-playlist-add)
        (if (member (cdr (assq 'state (mpc-cmd-status))) '("stop"))
            (mpc-cmd-play))
      (user-error "Don't know what to play"))))