comparison 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
comparison
equal deleted inserted replaced
459:9d4fd877b885 460:223736d75acb
36 36
37 ;; It requires find-paths.el and packages.el. 37 ;; It requires find-paths.el and packages.el.
38 38
39 ;;; Code: 39 ;;; Code:
40 40
41 (defvar paths-core-load-path-depth 1 41 (defvar paths-core-load-path-depth 0
42 "Depth of load-path searches in core Lisp paths.") 42 "Depth of load-path searches in core Lisp paths.")
43 43
44 (defvar paths-site-load-path-depth 1 44 (defvar paths-site-load-path-depth 1
45 "Depth of load-path searches in site Lisp paths.") 45 "Depth of load-path searches in site Lisp paths.")
46
47 (defvar paths-mule-load-path-depth 0
48 "Depth of load-path searches in Mule Lisp paths.")
46 49
47 (defvar paths-default-info-directories 50 (defvar paths-default-info-directories
48 (mapcar (function 51 (mapcar (function
49 (lambda (dirlist) 52 (lambda (dirlist)
50 (paths-construct-path 53 (paths-construct-path
71 "Find the main Lisp directory of the XEmacs hierarchy." 74 "Find the main Lisp directory of the XEmacs hierarchy."
72 (paths-find-version-directory roots "lisp" 75 (paths-find-version-directory roots "lisp"
73 nil 76 nil
74 configure-lisp-directory)) 77 configure-lisp-directory))
75 78
79 (defun paths-find-mule-lisp-directory (roots &optional lisp-directory)
80 "Find the Mule Lisp directory of the XEmacs hierarchy."
81 ;; #### kludge
82 (if lisp-directory
83 (let ((guess
84 (file-name-as-directory
85 (paths-construct-path (list lisp-directory "mule")))))
86 (if (paths-file-readable-directory-p guess)
87 guess
88 (paths-find-version-directory roots "mule-lisp"
89 nil
90 configure-mule-lisp-directory)))))
91
76 (defun paths-find-module-directory (roots) 92 (defun paths-find-module-directory (roots)
77 "Find the main modules directory of the XEmacs hierarchy." 93 "Find the main modules directory of the XEmacs hierarchy."
78 (paths-find-architecture-directory roots "modules" 94 (paths-find-architecture-directory roots "modules"
79 nil configure-module-directory)) 95 nil configure-module-directory))
80 96
81 (defun paths-construct-load-path 97 (defun paths-construct-load-path
82 (roots early-package-load-path late-package-load-path last-package-load-path 98 (roots early-package-load-path late-package-load-path last-package-load-path
83 lisp-directory 99 lisp-directory
84 &optional site-lisp-directory) 100 &optional site-lisp-directory mule-lisp-directory)
85 "Construct the load path." 101 "Construct the load path."
86 (let* ((envvar-value (getenv "EMACSLOADPATH")) 102 (let* ((envvar-value (getenv "EMACSLOADPATH"))
87 (env-load-path 103 (env-load-path
88 (and envvar-value 104 (and envvar-value
89 (paths-decode-directory-path envvar-value 'drop-empties))) 105 (paths-decode-directory-path envvar-value 'drop-empties)))
90 (site-lisp-load-path 106 (site-lisp-load-path
91 (and site-lisp-directory 107 (and site-lisp-directory
92 (paths-find-recursive-load-path (list site-lisp-directory) 108 (paths-find-recursive-load-path (list site-lisp-directory)
93 paths-site-load-path-depth))) 109 paths-site-load-path-depth)))
110 (mule-lisp-load-path
111 (and mule-lisp-directory
112 (paths-find-recursive-load-path (list mule-lisp-directory)
113 paths-mule-load-path-depth)))
94 (lisp-load-path 114 (lisp-load-path
95 (and lisp-directory 115 (and lisp-directory
96 (paths-find-recursive-load-path (list lisp-directory) 116 (paths-find-recursive-load-path (list lisp-directory)
97 paths-core-load-path-depth)))) 117 paths-core-load-path-depth))))
98 (append env-load-path 118 (append env-load-path
99 early-package-load-path 119 early-package-load-path
100 site-lisp-load-path 120 site-lisp-load-path
101 late-package-load-path 121 late-package-load-path
122 mule-lisp-load-path
102 lisp-load-path 123 lisp-load-path
103 last-package-load-path))) 124 last-package-load-path)))
104 125
105 (defun paths-construct-module-load-path 126 (defun paths-construct-module-load-path
106 (root module-directory &optional site-module-directory) 127 (root module-directory &optional site-module-directory)