aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-12 23:06:00 +0000
committerforcer <mwolson@gnu.org>2005-09-12 23:06:00 +0000
commit8124eab34627950a72a15a1f279c98cc2aaaccc6 (patch)
treeafe0e37255f2675e41064e3fa3798caa2ba4d1e3
parent4ab7c61701b9eb1bac0d75207fdcf8bbe17dbec2 (diff)
Lots of condition-case fixes.
darcs-hash:20050912230657-2189f-75349f8e27c54a20151ec3f52ebcfd97af1c810f.gz
-rw-r--r--emms.el17
1 files changed, 9 insertions, 8 deletions
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 ()