diff lisp/setup-paths.el @ 460:223736d75acb r21-2-45

Import from CVS: tag r21-2-45
author cvs
date Mon, 13 Aug 2007 11:43:24 +0200
parents 3d3049ae1304
children 79940b592197
line wrap: on
line diff
--- a/lisp/setup-paths.el	Mon Aug 13 11:42:27 2007 +0200
+++ b/lisp/setup-paths.el	Mon Aug 13 11:43:24 2007 +0200
@@ -38,12 +38,15 @@
 
 ;;; Code:
 
-(defvar paths-core-load-path-depth 1
+(defvar paths-core-load-path-depth 0
   "Depth of load-path searches in core Lisp paths.")
 
 (defvar paths-site-load-path-depth 1
   "Depth of load-path searches in site Lisp paths.")
 
+(defvar paths-mule-load-path-depth 0
+  "Depth of load-path searches in Mule Lisp paths.")
+
 (defvar paths-default-info-directories
   (mapcar (function
 	   (lambda (dirlist)
@@ -73,6 +76,19 @@
 				nil
 				configure-lisp-directory))
 
+(defun paths-find-mule-lisp-directory (roots &optional lisp-directory)
+  "Find the Mule Lisp directory of the XEmacs hierarchy."
+  ;; #### kludge
+  (if lisp-directory
+      (let ((guess
+	     (file-name-as-directory
+	      (paths-construct-path (list lisp-directory "mule")))))
+	(if (paths-file-readable-directory-p guess)
+	    guess
+	  (paths-find-version-directory roots "mule-lisp"
+					nil
+					configure-mule-lisp-directory)))))
+
 (defun paths-find-module-directory (roots)
   "Find the main modules directory of the XEmacs hierarchy."
   (paths-find-architecture-directory roots "modules"
@@ -81,7 +97,7 @@
 (defun paths-construct-load-path
   (roots early-package-load-path late-package-load-path last-package-load-path
 	 lisp-directory
-	 &optional site-lisp-directory)
+	 &optional site-lisp-directory mule-lisp-directory)
   "Construct the load path."
   (let* ((envvar-value (getenv "EMACSLOADPATH"))
 	 (env-load-path
@@ -91,6 +107,10 @@
 	  (and site-lisp-directory
 	       (paths-find-recursive-load-path (list site-lisp-directory)
 					       paths-site-load-path-depth)))
+	 (mule-lisp-load-path
+	  (and mule-lisp-directory
+	       (paths-find-recursive-load-path (list mule-lisp-directory)
+					       paths-mule-load-path-depth)))
 	 (lisp-load-path
 	  (and lisp-directory
 	       (paths-find-recursive-load-path (list lisp-directory)
@@ -99,6 +119,7 @@
 	    early-package-load-path
 	    site-lisp-load-path
 	    late-package-load-path
+	    mule-lisp-load-path
 	    lisp-load-path
 	    last-package-load-path)))