diff lisp/packages.el @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents 7df0dd720c89
children e11d67e05968
line wrap: on
line diff
--- a/lisp/packages.el	Mon Aug 13 10:34:15 2007 +0200
+++ b/lisp/packages.el	Mon Aug 13 10:35:03 2007 +0200
@@ -329,15 +329,20 @@
      (and version-directory (list version-directory))
      (and site-directory (list site-directory)))))
 
-(defvar packages-special-bases '("etc" "info" "lisp" "lib-src" "bin")
+(defvar packages-special-base-regexp "^\\(etc\\|info\\|lisp\\|lib-src\\|bin\\)$"
   "Special subdirectories of packages.")
 
+(defvar packages-no-package-hierarchy-regexp
+  (concat "\\(" paths-version-control-filename-regexp "\\)"
+	  "\\|"
+	  "\\(" packages-special-base-regexp "\\)")
+  "Directories which can't be the roots of package hierarchies.")
+
 (defun packages-find-packages-in-directories (directories)
   "Find all packages underneath directories in DIRECTORIES."
   (paths-find-recursive-path directories
 			     packages-hierarchy-depth
-			     (append paths-version-control-bases
-				     packages-special-bases)))
+			     packages-no-package-hierarchy-regexp))
 
 (defun packages-split-path (path)
   "Split PATH at \"\", return pair with two components.