aboutsummaryrefslogtreecommitdiff
path: root/emms.el
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-18 15:47:00 +0000
committerforcer <mwolson@gnu.org>2005-09-18 15:47:00 +0000
commita6ffe948ddbb1c061114bdf5b4a7c424d756bc97 (patch)
tree9ccfac73671e113fcdaa33124902384a55408feb /emms.el
parentfcf800bdfa668461ffc4003b73b884632b1c5e78 (diff)
emms-playlist-set-playlist-buffer: Ensure the selected buffer is a playlist.
darcs-hash:20050918154758-2189f-720bc6d736b60db1d420c97a59eef0c5847fa859.gz
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.