From 043320f4cb7dd763ffe6df95b0f1c68ecf7f82f2 Mon Sep 17 00:00:00 2001 From: yoni-r Date: Sat, 12 Aug 2006 19:49:00 +0000 Subject: added emms-with-excluded-directories to emms-source-file darcs-hash:20060812194959-85c19-4195c0957541a78db68c51bf31adcb5e58a67923.gz --- emms-source-file.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3