From b4c652a8f64b5d1426c47ea216f37ad6ad1861f1 Mon Sep 17 00:00:00 2001 From: forcer Date: Tue, 13 Sep 2005 01:37:00 +0000 Subject: Throw errors for `emms-next' and `emms-previous' at the end/beginning of the playlist darcs-hash:20050913013733-2189f-8af35462c962d2f187a6453ffdc6afbf3d538d70.gz --- emms.el | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'emms.el') diff --git a/emms.el b/emms.el index 67c9aae..f19756e 100644 --- a/emms.el +++ b/emms.el @@ -552,11 +552,12 @@ used, and the contents removed." (point-min))) (condition-case nil (progn - (condition-case nil - (emms-playlist-next) - (error - (when emms-repeat-playlist - (emms-playlist-first)))) + (if emms-repeat-playlist + (condition-case nil + (emms-playlist-next) + (error + (emms-playlist-first))) + (emms-playlist-next)) (emms-playlist-select (point))) (error (error "No next track in playlist")))))) @@ -571,11 +572,12 @@ used, and the contents removed." (point-max))) (condition-case nil (progn - (condition-case nil - (emms-playlist-previous) - (error - (when emms-repeat-playlist - (emms-playlist-last)))) + (if emms-repeat-playlist + (condition-case nil + (emms-playlist-previous) + (error + (emms-playlist-last))) + (emms-playlist-previous)) (emms-playlist-select (point))) (error (error "No previous track in playlist")))))) -- cgit v1.2.3