From 8124eab34627950a72a15a1f279c98cc2aaaccc6 Mon Sep 17 00:00:00 2001 From: forcer Date: Mon, 12 Sep 2005 23:06:00 +0000 Subject: Lots of condition-case fixes. darcs-hash:20050912230657-2189f-75349f8e27c54a20151ec3f52ebcfd97af1c810f.gz --- emms.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'emms.el') diff --git a/emms.el b/emms.el index 9a2ee33..f63a867 100644 --- a/emms.el +++ b/emms.el @@ -227,7 +227,7 @@ This is a good function to put in `emms-player-finished-hook'." (progn (emms-playlist-select-next) t) - (t nil)) + (error nil)) (emms-start)) (t (message "No next track in playlist")))) @@ -413,7 +413,8 @@ used, and the contents removed." (error "No next track")) (when (not (emms-playlist-track-at next)) (setq next (next-single-property-change next 'emms-track))) - (when (not next) + (when (or (not next) + (= next (point-max))) (error "No next track")) (goto-char next))) @@ -439,7 +440,7 @@ used, and the contents removed." (when (not (emms-playlist-track-at (point))) (emms-playlist-next)) (point)) - (t + (error nil)))) (if first (goto-char first) @@ -452,7 +453,7 @@ used, and the contents removed." (goto-char (point-max)) (emms-playlist-previous) (point)) - (t + (error nil)))) (if last (goto-char last) @@ -517,11 +518,11 @@ used, and the contents removed." (progn (condition-case nil (emms-playlist-next) - (t + (error (when emms-repeat-playlist (emms-playlist-first)))) (emms-playlist-select (point))) - (t + (error (error "No next track in playlist")))))) (defun emms-playlist-select-previous () @@ -536,11 +537,11 @@ used, and the contents removed." (progn (condition-case nil (emms-playlist-previous) - (t + (error (when emms-repeat-playlist (emms-playlist-last)))) (emms-playlist-select (point))) - (t + (error (error "No previous track in playlist")))))) (defun emms-playlist-select-first () -- cgit v1.2.3