diff options
author | forcer <forcer> | 2005-09-18 15:47:00 +0000 |
---|---|---|
committer | forcer <mwolson@gnu.org> | 2005-09-18 15:47:00 +0000 |
commit | a6ffe948ddbb1c061114bdf5b4a7c424d756bc97 (patch) | |
tree | 9ccfac73671e113fcdaa33124902384a55408feb | |
parent | fcf800bdfa668461ffc4003b73b884632b1c5e78 (diff) |
emms-playlist-set-playlist-buffer: Ensure the selected buffer is a playlist.
darcs-hash:20050918154758-2189f-720bc6d736b60db1d420c97a59eef0c5847fa859.gz
-rw-r--r-- | emms.el | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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. |