[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emms-help] Re: substr doesn't work on sequences (in XEmacs)

From: Michael Olson
Subject: [emms-help] Re: substr doesn't work on sequences (in XEmacs)
Date: Sun, 28 Aug 2005 22:03:29 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Jorgen Schaefer <address@hidden> writes:

> I do have an objection to requiring `cl' when there is a perfectly
> working variant outside of `cl' available.
> The correct solution is something along the lines of
> (defalias emms-subseq (if (featurep 'xemacs)
>                          'subseq
>                         'substring)
>   "...")

That does look better, as long as one omits the third argument to
defalias (since XEmacs doesn't support it).

> I would have commited that already, but I currently lack the time to
> test it.

From a grep-find for "substring" through the EMMS sources, it looks
like emms-playlist-add and emms-playlist-remove are the only functions
that would need to use emms-subseq.  Sounds safe to me.

>> Using subseq also fixes a problem I was seeing when emms-playlist
>> is nil upon calling emms-playlist-add.
> Could you elaborate?

Oh, I found out that I'm supposed to set emms-playlist to [] rather
than to nil.  Sorry about that.

(substring nil 0 0) => Lisp error: (wrong-type-argument arrayp nil)
(substring [] 0 0) => []

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: pgp6G9bk1Ge8Q.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]