aboutsummaryrefslogtreecommitdiff
path: root/emms.el
diff options
context:
space:
mode:
Diffstat (limited to 'emms.el')
-rw-r--r--emms.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/emms.el b/emms.el
index 419c454..b18bc75 100644
--- a/emms.el
+++ b/emms.el
@@ -431,9 +431,11 @@ Otherwise, return the type and the name with a colon in between."
(defun emms-playlist-set-playlist-buffer (&optional buffer)
"Set the current playlist buffer."
(interactive "bNew playlist buffer: ")
- (emms-playlist-ensure-playlist-buffer)
- (setq emms-playlist-buffer (or (get-buffer buffer)
- (current-buffer))))
+ (let ((buf (or (get-buffer buffer)
+ (current-buffer))))
+ (with-current-buffer buf
+ (emms-playlist-ensure-playlist-buffer))
+ (setq emms-playlist-buffer buf)))
(defun emms-playlist-new (&optional name)
"Create a new playlist buffer.