aboutsummaryrefslogtreecommitdiff
path: root/emms-source-file.el
diff options
context:
space:
mode:
authorforcer <forcer>2006-04-10 12:26:00 +0000
committerforcer <mwolson@gnu.org>2006-04-10 12:26:00 +0000
commit640c4753038283d32b28c242b382ab6ff124f5db (patch)
treecc796afe3bddef59242a16e876f9c03c0b6f16bd /emms-source-file.el
parent6618771242832290c6bca0f8c0ce944e04780750 (diff)
emms-source-file.el: Fix dired source.
darcs-hash:20060410122652-2189f-45a475ba6dcf5ed0ac492d2052bebba6cd6d5938.gz
Diffstat (limited to 'emms-source-file.el')
-rw-r--r--emms-source-file.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/emms-source-file.el b/emms-source-file.el
index 6634130..f8d5e9e 100644
--- a/emms-source-file.el
+++ b/emms-source-file.el
@@ -140,6 +140,18 @@ value of `emms-source-file-default-directory'."
(emms-track 'file file)))
(emms-source-file-directory-tree dir regex)))
+;;;###autoload (autoload 'emms-play-dired "emms-source-file" nil t)
+;;;###autoload (autoload 'emms-add-dired "emms-source-file" nil t)
+(define-emms-source dired ()
+ "Return all marked files of a dired buffer"
+ (interactive)
+ (mapc (lambda (file)
+ (if (file-directory-p file)
+ (emms-source-directory-tree file)
+ (emms-source-file file)))
+ (with-current-buffer emms-source-old-buffer
+ (dired-get-marked-files))))
+
;;; Helper functions
@@ -194,16 +206,6 @@ may be supplied using `emms-source-file-gnu-find'."
"\n"))))
;;;###autoload
-(defun emms-source-files (files)
- "An EMMS source for a list of FILES."
- (mapc #'emms-source-file files))
-
-;;;###autoload
-(defun emms-source-dired ()
- "Return all marked files of a dired buffer"
- (emms-source-files (dired-get-marked-files)))
-
-;;;###autoload
(defun emms-source-file-regex ()
"Return a regexp that matches everything any player (that supports
files) can play."
@@ -248,7 +250,7 @@ files) can play."
"An EMMS source for streaming playlists (usually URLs ending in .pls."
(interactive "sPlay URL: ")
(emms-playlist-insert-track (emms-track 'streamlist streamlist)))
-
+
(provide 'emms-source-file)
;;; emms-source-file.el ends here