aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emms-playlist-mode.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el
index 44bd276..46f80bb 100644
--- a/emms-playlist-mode.el
+++ b/emms-playlist-mode.el
@@ -250,18 +250,14 @@ of the saved playlist inside."
;;; Entry
;;; --------------------------------------------------------
-;; FIXME: everything is wrong here, implement non-twisted logic and an
-;; interactive manner of selecting/creating a different playlist to
-;; the current/default one.
-(defun emms-playlist-mode-go (&optional pl-buffer)
+(defun emms-playlist-mode-go ()
(interactive)
- (when (null pl-buffer)
- (setq pl-buffer emms-playlist-buffer)
- (when (not pl-buffer)
- (setq pl-buffer (emms-playlist-new))))
- (switch-to-buffer pl-buffer)
- (unless (eq major-mode 'emms-playlist-mode)
- (emms-playlist-mode)))
+ (if (null emms-playlist-buffer)
+ (error "No current Emms buffer")
+ (switch-to-buffer emms-playlist-buffer)
+ (when (and (not (eq major-mode 'emms-playlist-mode))
+ emms-playlist-buffer-p)
+ (emms-playlist-mode))))
(defun emms-playlist-mode-startup ()
(unless (or emms-playlist-selected-marker