From 640c4753038283d32b28c242b382ab6ff124f5db Mon Sep 17 00:00:00 2001 From: forcer Date: Mon, 10 Apr 2006 12:26:00 +0000 Subject: emms-source-file.el: Fix dired source. darcs-hash:20060410122652-2189f-45a475ba6dcf5ed0ac492d2052bebba6cd6d5938.gz --- emms-source-file.el | 24 +++++++++++++----------- 1 file 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 @@ -193,16 +205,6 @@ may be supplied using `emms-source-file-gnu-find'." (point-max)) "\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 @@ -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 -- cgit v1.2.3