]> code.delx.au - gnu-emacs/commitdiff
* lisp/mpc.el (mpc-songs-refresh): Don't side-effect `active'
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 13 Oct 2015 13:48:16 +0000 (09:48 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 13 Oct 2015 13:48:16 +0000 (09:48 -0400)
... since it might come straight from the memoizing table.

lisp/mpc.el

index a5fc376eaea07ddf5e5ec9fdeff56c6626946da4..21002ec5081d894f82d5b792558e766fadc00681 100644 (file)
@@ -1960,7 +1960,7 @@ This is used so that they can be compared with `eq', which is needed for
             ;; I punt on it and just use file-name sorting, which does the
             ;; right thing if your library is properly arranged.
             (dolist (song (if dontsort active
-                            (sort active
+                            (sort (copy-sequence active)
                                   (lambda (song1 song2)
                                     (let ((cmp (mpc-compare-strings
                                                 (cdr (assq 'file song1))