Function: mpc-cmd-delete

mpc-cmd-delete is a byte-compiled function defined in mpc.el.gz.

Signature

(mpc-cmd-delete SONG-POSS &optional PLAYLIST)

Documentation

Delete the songs at positions SONG-POSS from PLAYLIST.

If PLAYLIST is t or nil or missing, use the main playlist.

Source Code

;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-cmd-delete (song-poss &optional playlist)
  "Delete the songs at positions SONG-POSS from PLAYLIST.
If PLAYLIST is t or nil or missing, use the main playlist."
  (mpc-proc-cmd (mpc-proc-cmd-list
                 (mapcar (lambda (song-pos)
                           (if (stringp playlist)
                               (list "playlistdelete" playlist song-pos)
                             (list "delete" song-pos)))
                         ;; Sort them from last to first, so the renumbering
                         ;; caused by the earlier deletions don't affect
                         ;; later ones.
                         (sort (copy-sequence song-poss) #'>))))
    (if (stringp playlist)
        (puthash (cons 'Playlist playlist) nil mpc--find-memoize)))