X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fsetup-paths.el;h=7ad409b81d20a9e66961f17184747bed8ec7bd18;hp=a01dff39b77262c9f5d04bc652571414fbf8be08;hb=414b512c0774e67ba8e160b605447d862d3be166;hpb=ea1ea793fe6e244ef5555ed983423a204101af13 diff --git a/lisp/setup-paths.el b/lisp/setup-paths.el index a01dff3..7ad409b 100644 --- a/lisp/setup-paths.el +++ b/lisp/setup-paths.el @@ -38,9 +38,18 @@ ;;; Code: -(defvar paths-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-utf-2000-load-path-depth 0 + "Depth of load-path searches in UTF-2000 Lisp paths.") + (defvar paths-default-info-directories (mapcar (function (lambda (dirlist) @@ -70,6 +79,32 @@ 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-utf-2000-lisp-directory (roots &optional lisp-directory) + "Find the UTF-2000 Lisp directory of the XEmacs hierarchy." + ;; #### kludge + (if lisp-directory + (let ((guess + (file-name-as-directory + (paths-construct-path (list lisp-directory "utf-2000"))))) + (if (paths-file-readable-directory-p guess) + guess + (paths-find-version-directory roots "utf-2000-lisp" + nil + configure-utf-2000-lisp-directory))))) + (defun paths-find-module-directory (roots) "Find the main modules directory of the XEmacs hierarchy." (paths-find-architecture-directory roots "modules" @@ -78,7 +113,8 @@ (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 + utf-2000-lisp-directory) "Construct the load path." (let* ((envvar-value (getenv "EMACSLOADPATH")) (env-load-path @@ -87,15 +123,25 @@ (site-lisp-load-path (and site-lisp-directory (paths-find-recursive-load-path (list site-lisp-directory) - paths-load-path-depth))) + 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))) + (utf-2000-lisp-load-path + (and utf-2000-lisp-directory + (paths-find-recursive-load-path (list utf-2000-lisp-directory) + paths-utf-2000-load-path-depth))) (lisp-load-path (and lisp-directory (paths-find-recursive-load-path (list lisp-directory) - paths-load-path-depth)))) + paths-core-load-path-depth)))) (append env-load-path early-package-load-path site-lisp-load-path late-package-load-path + utf-2000-lisp-load-path + mule-lisp-load-path lisp-load-path last-package-load-path))) @@ -109,11 +155,11 @@ (site-module-load-path (and site-module-directory (paths-find-recursive-load-path (list site-module-directory) - paths-load-path-depth))) + paths-site-load-path-depth))) (module-load-path (and module-directory (paths-find-recursive-load-path (list module-directory) - paths-load-path-depth)))) + paths-core-load-path-depth)))) (append env-module-path site-module-load-path module-load-path))) @@ -143,23 +189,6 @@ "Find the documentation directory." (paths-find-architecture-directory roots "lib-src" nil configure-doc-directory)) -(defun paths-find-lock-directory (roots) - "Find the lock directory." - (defvar configure-lock-directory) - (paths-find-site-directory roots "lock" "EMACSLOCKDIR" configure-lock-directory)) - -(defun paths-find-superlock-file (lock-directory) - "Find the superlock file." - ;; #### There is no such variable configure-superlock-file! - (cond - ((null lock-directory) - nil) - ((and configure-superlock-file - (file-directory-p (file-name-directory configure-superlock-file))) - configure-superlock-file) - (t - (expand-file-name "!!!SuperLock!!!" lock-directory)))) - (defun paths-find-exec-directory (roots) "Find the binary directory." (paths-find-architecture-directory roots "lib-src"