Angus Lees <[EMAIL PROTECTED]> writes:

> In XEmacs 21.4 (at least), substr doesn't work on sequences, you
> have to use `subseq'

Any objections to the installation of the following patch?  Using
subseq also fixes a problem I was seeing when emms-playlist is nil
upon calling emms-playlist-add.

--- orig/emms.el	2005-08-28 19:38:04.000000000 -0500
+++ mod/emms.el	2005-08-28 19:37:52.000000000 -0500
@@ -41,6 +41,8 @@
 (defvar emms-version "1.3 $Revision: 1.63 $"
   "EMMS version string.")
 
+(eval-when-compile (require 'cl))
+
 (defmacro emms-define-obsolete-variable-alias
   (obsolete-name current-name &optional when docstring)
   "Make OBSOLETE-NAME an obsolete variable alias for CURRENT-NAME.
@@ -408,17 +410,17 @@
 Insert at IDX, which defaults to the end."
   (let ((idx (or idx (length emms-playlist))))
     (emms-playlist-set-playlist
-     (vconcat (substring emms-playlist 0 idx)
+     (vconcat (subseq emms-playlist 0 idx)
               (if emms-playlist-sort-added-tracks-p
                   (emms-playlist-sort-vector seq)
                 seq)
-              (substring emms-playlist idx)))))
+              (subseq emms-playlist idx)))))
 
 (defun emms-playlist-remove (idx)
   "Remove track at IDX from the EMMS playlist."
   (emms-playlist-set-playlist
-   (vconcat (substring emms-playlist 0 idx)
-	    (substring emms-playlist (1+ idx)))))
+   (vconcat (subseq emms-playlist 0 idx)
+            (subseq emms-playlist (1+ idx)))))
 
 (defun emms-playlist-search-vector (track vector)
   "Return the index of TRACK in VECTOR, or nil if not found.
-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: anime, Debian, XHTML, wiki, Emacs Lisp
  /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #pulug
 |_] | \| |_| Jabber: mwolson_at_hcoop.net

Attachment: pgp3qmZNxTe3J.pgp
Description: PGP signature

_______________________________________________
Emms-help mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emms-help

Reply via email to