diff options
author | forcer <forcer> | 2005-09-16 21:26:00 +0000 |
---|---|---|
committer | forcer <mwolson@gnu.org> | 2005-09-16 21:26:00 +0000 |
commit | 74ffb1b03be6669294921c2e6e754b8f6fc2b2c9 (patch) | |
tree | 8657c728d3fc5571b22807ba1762baf5c01f4839 | |
parent | 46f2edc42166eb1a4a840485f410823b9e0c8b72 (diff) |
Add `emms-ensure-player-playing-p'
darcs-hash:20050916212623-2189f-bda20f8b211ef0ef2e85316c0d9b684fb391b237.gz
-rw-r--r-- | emms.el | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -274,9 +274,8 @@ This is a good function to put in `emms-player-finished-hook'." This can be a floating point number for sub-second fractions. It can also be negative to seek backwards." (interactive "nSeconds to seek: ") - (if emms-player-playing-p - (emms-player-seek seconds) - (error "Nothing playing right now"))) + (emms-ensure-player-playing-p) + (emms-player-seek seconds)) (defun emms-seek-forward () "Seek ten seconds forward." @@ -340,6 +339,11 @@ See `emms-repeat-track'." (string< (emms-track-name a) (emms-track-name b))) +(defun emms-ensure-player-playing-p () + "Raise an error if no player is playing right now." + (when (not emms-player-playing-p) + (error "No EMMS player playing right now"))) + ;;; Tracks |