Function: mpc-songs-selection

mpc-songs-selection is a byte-compiled function defined in mpc.el.gz.

Signature

(mpc-songs-selection)

Documentation

Return the list of songs currently selected.

Source Code

;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-songs-selection ()
  "Return the list of songs currently selected."
  (let ((buf (mpc-proc-buffer (mpc-proc) 'songs)))
    (when (buffer-live-p buf)
      (with-current-buffer buf
        (save-excursion
          (let ((files ()))
            (if mpc-select
                (dolist (ol mpc-select)
                  (push (cons
                         (get-text-property (overlay-start ol) 'mpc-file)
                         (get-text-property (overlay-start ol) 'mpc-file-pos))
                        files))
              (goto-char (point-min))
              (while (not (eobp))
                (push (cons
                       (get-text-property (point) 'mpc-file)
                       (get-text-property (point) 'mpc-file-pos))
                      files)
                (forward-line 1)))
            (nreverse files)))))))