aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryoni-r <yoni-r>2006-08-12 19:49:00 +0000
committeryoni-r <mwolson@gnu.org>2006-08-12 19:49:00 +0000
commit043320f4cb7dd763ffe6df95b0f1c68ecf7f82f2 (patch)
tree7c38101272754187214b50766b33c6b65ebf2f5e
parent09ec5bcfdd5320369ce49919e33d7048280af450 (diff)
added emms-with-excluded-directories to emms-source-file
darcs-hash:20060812194959-85c19-4195c0957541a78db68c51bf31adcb5e58a67923.gz
-rw-r--r--emms-source-file.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/emms-source-file.el b/emms-source-file.el
index b261746..7a395bd 100644
--- a/emms-source-file.el
+++ b/emms-source-file.el
@@ -226,6 +226,15 @@ may be supplied using `emms-source-file-gnu-find'."
(point-max))
"\n"))))
+(defmacro emms-with-excluded-directories (directory-list &rest body)
+ "Run BODY while excluding DIRECTORY-LIST."
+ `(let ((emms-source-file-exclude-regexp
+ (concat (or ,emms-source-file-exclude-regexp "")
+ "\\|\\("
+ (or (regexp-opt ,directory-list) "")
+ "\\)")))
+ ,@body))
+
;;;###autoload
(defun emms-source-file-regex ()
"Return a regexp that matches everything any player (that supports