aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Xu <william.xwl@gmail.com>2007-06-05 08:57:00 +0000
committerWilliam Xu <william.xwl@gmail.com>2007-06-05 08:57:00 +0000
commit5d5475c6069037fb678fa68b33afa0d0c72901eb (patch)
tree9b99255cbe4c0a1a04e035f383324076ceea947c
parentf57e6f4b0eb4f730107c4a912bd20b1de756f746 (diff)
emms-playlist-mode.el: (emms) `emms-add-file' actually understands both
file and directories, so let's use `emms-add-file'. darcs-hash:20070605085746-cfa61-80bf6246e667746da96834c9d1559284b8d5a5b4.gz
-rw-r--r--emms-playlist-mode.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el
index 78912cc..34be4f9 100644
--- a/emms-playlist-mode.el
+++ b/emms-playlist-mode.el
@@ -489,14 +489,13 @@ When NO-NEWLINE is non-nil, do not insert a newline after the track."
emms-playlist-mode and query for a directory tree to add to the
playlist."
(interactive)
- (emms-playlist-mode-go)
- (when (not (condition-case nil (emms-playlist-first) (error nil)))
- (let ((dir (read-directory-name "Select a directory to add recursively: "
- emms-source-file-default-directory nil t)))
- (emms-add-directory-tree dir))))
+ (if (or (null emms-playlist-buffer)
+ (not (buffer-live-p emms-playlist-buffer)))
+ (call-interactively 'emms-add-file))
+ (emms-playlist-mode-go))
(defun emms-playlist-mode-go-popup (&optional window-width)
- "Popup emms-playlist buffer as a side window.
+ "Popup emms-playlist buffer as a side window.
Default value for WINDOW-WIDTH is `emms-playlist-mode-window-width'.
WINDOW-WIDTH should be a positive integer."