aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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