[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for load-dir.el

From: PJ Weisberg
Subject: Fix for load-dir.el
Date: Sun, 28 Aug 2011 12:40:28 -0700

I noticed that when load-dir-recursive is `t', load-dirs goes into
infinite recursion trying to load the directory ".".  This trivial
patch fixes it.  I don't have papers signed (yet), but this hardly
constitutes a creative work.  Can someone commit it to the elpa

--- a/packages/load-dir/load-dir.el
+++ b/packages/load-dir/load-dir.el
@@ -121,7 +121,7 @@ Recurses into subdirectories if `load-dir-recursive' is t."
           (add-to-list 'load-dir-loaded f))))

     (when load-dir-recursive
-      (dolist (f (directory-files dir t))
+      (dolist (f (directory-files dir t directory-files-no-dot-files-regexp))
         (when (file-directory-p f)
           (load-dir-one f))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]