Mercurial > hg > xemacs-beta
diff lisp/packages.el @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | 1d62742628b6 |
children | 6240c7796c7a |
line wrap: on
line diff
--- a/lisp/packages.el Mon Aug 13 11:01:58 2007 +0200 +++ b/lisp/packages.el Mon Aug 13 11:03:08 2007 +0200 @@ -63,9 +63,6 @@ (defvar packages-load-path-depth 1 "Depth of load-path search in package hierarchies.") -(defvar packages-data-path-depth 1 - "Depth of data-path search in package hierarchies.") - (defvar early-packages nil "Packages early in the load path.") @@ -136,18 +133,6 @@ version name (cdr pkg))) (t t)))) -(defun package-delete-name (name) - (let (pkg) - ;; Delete ALL versions of package. - ;; This is pretty memory-intensive, as we use copy-alist when deleting - ;; package entries, to prevent side-effects in functions that call this - ;; one. - (while (setq pkg (assq name packages-package-list)) - (setq packages-package-list (delete pkg (copy-alist - packages-package-list))) - ) - )) - ;;; Build time stuff (defvar autoload-file-name "auto-autoloads.el" @@ -203,8 +188,8 @@ (member 'crypt-find-file-hook find-file-hooks))) ;; Compression involved. (if nosuffix - ":.gz:.bz2:.Z" - ".elc:.elc.gz:.elc.bz2:.elc.Z:.el:.el.gz:.el.bz2:.el.Z::.gz:.bz2:.Z")) + ":.gz:.Z" + ".elc:.elc.gz:elc.Z:.el:.el.gz:.el.Z::.gz:.Z")) (t ;; No compression. (if nosuffix @@ -235,10 +220,14 @@ (setq path (cdr path))) autoloads)) -(defun packages-list-autoloads (source-directory) +(defun packages-list-autoloads () "List autoload files in (what will be) the normal lisp search path. This function is used during build to find where the global symbol files so they can be perused for their useful information." + ;; Source directory may not be initialized yet. + ;; (print (prin1-to-string load-path)) + (if (null source-directory) + (setq source-directory (car load-path))) (let ((files (directory-files (file-name-as-directory source-directory) t ".*")) file autolist) @@ -305,23 +294,6 @@ ;; Data-directory is really a list now. Provide something to search it for ;; directories. -(defun locate-data-directory-list (name &optional dir-list) - "Locate the matching list of directories in a search path DIR-LIST. -If no DIR-LIST is supplied, it defaults to `data-directory-list'." - (unless dir-list - (setq dir-list data-directory-list)) - (let (found found-dir found-dir-list) - (while dir-list - (setq found (file-name-as-directory (concat (car dir-list) name)) - found-dir (file-directory-p found)) - (and found-dir - (setq found-dir-list (cons found found-dir-list))) - (setq dir-list (cdr dir-list))) - (nreverse found-dir-list))) - -;; Data-directory is really a list now. Provide something to search it for -;; a directory. - (defun locate-data-directory (name &optional dir-list) "Locate a directory in a search path DIR-LIST (a list of directories). If no DIR-LIST is supplied, it defaults to `data-directory-list'." @@ -359,7 +331,7 @@ (and version-directory (list version-directory)) (and site-directory (list site-directory))))) -(defvar packages-special-base-regexp "^\\(etc\\|info\\|lisp\\|lib-src\\|bin\\|pkginfo\\|man\\)$" +(defvar packages-special-base-regexp "^\\(etc\\|info\\|lisp\\|lib-src\\|bin\\)$" "Special subdirectories of packages.") (defvar packages-no-package-hierarchy-regexp @@ -473,25 +445,16 @@ packages-load-path-depth)) (defun packages-find-package-exec-path (packages) - "Construct the exec-path component for packages. -PACKAGES is a list of package directories." (packages-find-package-library-path packages (list (paths-construct-path (list "bin" system-configuration)) "lib-src"))) (defun packages-find-package-info-path (packages) - "Construct the info-path component for packages. -PACKAGES is a list of package directories." (packages-find-package-library-path packages '("info"))) (defun packages-find-package-data-path (packages) - "Construct the data-path component for packages. -PACKAGES is a list of package directories." - (paths-find-recursive-load-path - (packages-find-package-library-path packages - '("etc")) - packages-data-path-depth)) + (packages-find-package-library-path packages '("etc"))) ;; Loading package initialization files