changeset 1218:ceedb6eeaba8

[xemacs-hg @ 2003-01-16 08:59:47 by michaels] 2003-01-13 Mike Sperber <mike@xemacs.org> * packages.el: * find-paths.el: Revert this change 2000-04-01 Mike Sperber <mike@xemacs.org> * packages.el (packages-find-package-directories): Added support for external package hierarchies with in-place installations. * find-paths.el (paths-root-in-place-p): Added. (paths-find-emacs-directory): Added support for external directories with in-place installations. (paths-find-site-directory): Ditto.
author michaels
date Thu, 16 Jan 2003 08:59:47 +0000
parents 1d1c82f6b17e
children 4d3295160d6a
files lisp/find-paths.el lisp/packages.el
diffstat 2 files changed, 16 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/find-paths.el	Wed Jan 15 22:52:13 2003 +0000
+++ b/lisp/find-paths.el	Thu Jan 16 08:59:47 2003 +0000
@@ -111,10 +111,6 @@
     (paths-file-readable-directory-p (paths-construct-path (list directory "lisp")))
     (paths-file-readable-directory-p (paths-construct-path (list directory "etc"))))))
 
-(defun paths-root-in-place-p (root)
-  "Check if ROOT is an in-place installation root for XEmacs."
-  (paths-file-readable-directory-p (paths-construct-path (list root "lisp"))))
-
 (defun paths-chase-symlink (file-name)
   "Chase a symlink until the bitter end."
       (let ((maybe-symlink (file-symlink-p file-name)))
@@ -165,8 +161,7 @@
      base))))
 
 (defun paths-find-emacs-directory (roots suffix base
-				   &optional envvar default keep-suffix
-				   	     in-place-external)
+				   &optional envvar default keep-suffix)
   "Find a directory in the XEmacs hierarchy.
 ROOTS must be a list of installation roots.
 SUFFIX is the subdirectory from there.
@@ -175,9 +170,7 @@
 specify the directory.
 DEFAULT is the preferred value.
 If KEEP-SUFFIX is non-nil, the suffix must be respected in searching
-the directory.
-If IN-PLACE-EXTERNAL is non-nil, the directory might be found outside
-an in-place root-hierarchy."
+the directory."
   (let ((preferred-value (or (and envvar (getenv envvar))
 			     default)))
     (if (and preferred-value
@@ -185,39 +178,28 @@
 	(file-name-as-directory preferred-value)
       (catch 'gotcha
 	(while roots
-	  (let ((root (car roots)))
-	    ;; installed
-	    (let ((path (paths-construct-emacs-directory root suffix base)))
-	      (if (paths-file-readable-directory-p path)
-		  (throw 'gotcha path)))
-	    ;; in-place
-	    (if (null keep-suffix)
-		(let ((path (paths-construct-emacs-directory root "" base)))
-		  (if (paths-file-readable-directory-p path)
-		      (throw 'gotcha path))))
-	    (if (and in-place-external
-		     (paths-root-in-place-p root))
-		(let ((path (paths-construct-emacs-directory
-			     (paths-construct-path '("..") root)
-			     "" base)))
-		  (if (paths-file-readable-directory-p path)
-		      (throw 'gotcha path)))))
+	  (let* ((root (car roots))
+		 ;; installed
+		 (path (paths-construct-emacs-directory root suffix base)))
+	    (if (paths-file-readable-directory-p path)
+		(throw 'gotcha path)
+	      ;; in-place
+	      (if (null keep-suffix)
+		  (let ((path (paths-construct-emacs-directory root "" base)))
+		    (if (paths-file-readable-directory-p path)
+			(throw 'gotcha path))))))
 	  (setq roots (cdr roots)))
 	nil))))
 
-(defun paths-find-site-directory (roots base &optional envvar default in-place-external)
-  "Find a site-specific directory in the XEmacs hierarchy.
-If IN-PLACE-EXTERNAL is non-nil, the directory might be found outside
-an in-place root-hierarchy."
+(defun paths-find-site-directory (roots base &optional envvar default)
+  "Find a site-specific directory in the XEmacs hierarchy."
   (paths-find-emacs-directory roots
 			      (file-name-as-directory
 			       (paths-construct-path (list
 						      "lib"
 						      emacs-program-name)))
 			      base
-			      envvar default
-			      nil
-			      in-place-external))
+			      envvar default))
 
 (defun paths-find-version-directory (roots base
 				     &optional envvar default enforce-version)
--- a/lisp/packages.el	Wed Jan 15 22:52:13 2003 +0000
+++ b/lisp/packages.el	Thu Jan 16 08:59:47 2003 +0000
@@ -358,7 +358,7 @@
   ;; make sure paths-find-version-directory and paths-find-site-directory
   ;; don't both pick up version-independent directories ...
   (let ((version-directory (paths-find-version-directory roots base nil nil t))
-	(site-directory (paths-find-site-directory roots base nil nil t)))
+	(site-directory (paths-find-site-directory roots base)))
     (paths-uniq-append
      (and version-directory (list version-directory))
      (and site-directory (list site-directory)))))