Function: mpc-constraints-restore

mpc-constraints-restore is a byte-compiled function defined in mpc.el.gz.

Signature

(mpc-constraints-restore CONSTRAINTS)

Source Code

;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-constraints-restore (constraints)
  (let ((search (assq 'Search constraints)))
    (setq mpc--song-search (cadr search))
    (when search (setq constraints (delq search constraints))))
  (dolist (buf (process-get (mpc-proc) 'buffers))
    (setq buf (cdr buf))
    (when (buffer-live-p buf)
      (let* ((tag (buffer-local-value 'mpc-tag buf))
             (constraint (mpc-constraints-tag-lookup tag constraints)))
        (when tag
          (with-current-buffer buf
            (mpc-select-restore constraint))))))
  (mpc-selection-refresh))