Mercurial > hg > xemacs-beta
comparison lisp/setup-paths.el @ 4108:5da4cc7d5968
[xemacs-hg @ 2007-08-09 06:22:51 by michaels]
2007-08-07 Mike Sperber <mike@xemacs.org>
* setup-paths.el (paths-find-doc-directory):
(paths-find-exec-directory):
(paths-find-lisp-directory):
(paths-find-mule-lisp-directory):
(paths-construct-info-path):
(paths-find-data-directory):
* packages.el (packages-find-installation-package-directories):
* find-paths.el (paths-for-each-emacs-directory):
(paths-find-emacs-directories):
(paths-find-emacs-directory):
(paths-for-each-site-directory):
(paths-find-site-directory):
(paths-find-site-directories):
(paths-for-each-version-directory):
(paths-find-version-directories):
(paths-find-version-directory): Generalize to multiple bases.
(paths-find-architecture-directory): Use above to give roots
precedence over bases. This means, for example, that a directory
in an in-place root will always get precedence over an installed
root.
author | michaels |
---|---|
date | Thu, 09 Aug 2007 06:22:53 +0000 |
parents | 9c0151d05116 |
children | 09c3d30b5d4e |
comparison
equal
deleted
inserted
replaced
4107:d3a3bc2726d6 | 4108:5da4cc7d5968 |
---|---|
156 installation-roots))) | 156 installation-roots))) |
157 | 157 |
158 (defun paths-find-site-lisp-directory (roots) | 158 (defun paths-find-site-lisp-directory (roots) |
159 "Find the site Lisp directory of the XEmacs hierarchy. | 159 "Find the site Lisp directory of the XEmacs hierarchy. |
160 ROOTS is a list of installation roots." | 160 ROOTS is a list of installation roots." |
161 (paths-find-site-directory roots "site-lisp" | 161 (paths-find-site-directory roots (list "site-lisp") |
162 nil nil | 162 nil nil |
163 configure-site-directory)) | 163 configure-site-directory)) |
164 | 164 |
165 (defun paths-find-site-module-directory (roots) | 165 (defun paths-find-site-module-directory (roots) |
166 "Find the site modules directory of the XEmacs hierarchy. | 166 "Find the site modules directory of the XEmacs hierarchy. |
167 ROOTS is a list of installation roots." | 167 ROOTS is a list of installation roots." |
168 (paths-find-site-directory roots "site-modules" | 168 (paths-find-site-directory roots (list "site-modules") |
169 t nil | 169 t nil |
170 configure-site-module-directory)) | 170 configure-site-module-directory)) |
171 | 171 |
172 (defun paths-find-lisp-directory (roots) | 172 (defun paths-find-lisp-directory (roots) |
173 "Find the main Lisp directory of the XEmacs hierarchy. | 173 "Find the main Lisp directory of the XEmacs hierarchy. |
174 ROOTS is a list of installation roots." | 174 ROOTS is a list of installation roots." |
175 (paths-find-version-directory roots "lisp" | 175 (paths-find-version-directory roots (list "lisp") |
176 nil nil | 176 nil nil |
177 configure-lisp-directory)) | 177 configure-lisp-directory)) |
178 | 178 |
179 (defun paths-find-mule-lisp-directory (roots &optional lisp-directory) | 179 (defun paths-find-mule-lisp-directory (roots &optional lisp-directory) |
180 "Find the Mule Lisp directory of the XEmacs hierarchy. | 180 "Find the Mule Lisp directory of the XEmacs hierarchy. |
184 (let ((guess | 184 (let ((guess |
185 (file-name-as-directory | 185 (file-name-as-directory |
186 (paths-construct-path (list lisp-directory "mule"))))) | 186 (paths-construct-path (list lisp-directory "mule"))))) |
187 (if (paths-file-readable-directory-p guess) | 187 (if (paths-file-readable-directory-p guess) |
188 guess | 188 guess |
189 (paths-find-version-directory roots "mule-lisp" | 189 (paths-find-version-directory roots (list "mule-lisp") |
190 nil nil | 190 nil nil |
191 configure-mule-lisp-directory))))) | 191 configure-mule-lisp-directory))))) |
192 | 192 |
193 (defun paths-find-module-directory (roots) | 193 (defun paths-find-module-directory (roots) |
194 "Find the main modules directory of the XEmacs hierarchy. | 194 "Find the main modules directory of the XEmacs hierarchy. |
195 ROOTS is a list of installation roots." | 195 ROOTS is a list of installation roots." |
196 (paths-find-architecture-directory roots "modules" | 196 (paths-find-architecture-directory roots (list "modules") |
197 nil configure-module-directory)) | 197 nil configure-module-directory)) |
198 | 198 |
199 (defun paths-construct-load-path | 199 (defun paths-construct-load-path |
200 (roots early-package-load-path late-package-load-path last-package-load-path | 200 (roots early-package-load-path late-package-load-path last-package-load-path |
201 lisp-directory | 201 lisp-directory |
262 respectively." | 262 respectively." |
263 (let ((info-path-envval (getenv "INFOPATH"))) | 263 (let ((info-path-envval (getenv "INFOPATH"))) |
264 (paths-uniq-append | 264 (paths-uniq-append |
265 (append | 265 (append |
266 (let ((info-directory | 266 (let ((info-directory |
267 (paths-find-version-directory roots "info" | 267 (paths-find-version-directory roots (list "info") |
268 nil nil | 268 nil nil |
269 configure-info-directory))) | 269 configure-info-directory))) |
270 (and info-directory | 270 (and info-directory |
271 (list info-directory))) | 271 (list info-directory))) |
272 (packages-find-package-info-path early-package-hierarchies) | 272 (packages-find-package-info-path early-package-hierarchies) |
280 (paths-directories-which-exist paths-default-info-directories)))))) | 280 (paths-directories-which-exist paths-default-info-directories)))))) |
281 | 281 |
282 (defun paths-find-doc-directory (roots) | 282 (defun paths-find-doc-directory (roots) |
283 "Find the documentation directory. | 283 "Find the documentation directory. |
284 ROOTS is the list of installation roots." | 284 ROOTS is the list of installation roots." |
285 (paths-find-architecture-directory roots "lib-src" nil configure-doc-directory)) | 285 (paths-find-architecture-directory roots (list "lib-src") nil configure-doc-directory)) |
286 | 286 |
287 (defun paths-find-exec-directory (roots) | 287 (defun paths-find-exec-directory (roots) |
288 "Find the binary directory. | 288 "Find the binary directory. |
289 ROOTS is the list of installation roots." | 289 ROOTS is the list of installation roots." |
290 (paths-find-architecture-directory roots "lib-src" | 290 (paths-find-architecture-directory roots (list "lib-src") |
291 nil configure-exec-directory)) | 291 nil configure-exec-directory)) |
292 | 292 |
293 (defun paths-construct-exec-path (roots exec-directory | 293 (defun paths-construct-exec-path (roots exec-directory |
294 early-package-hierarchies | 294 early-package-hierarchies |
295 late-package-hierarchies | 295 late-package-hierarchies |
317 (packages-find-package-exec-path last-package-hierarchies))) | 317 (packages-find-package-exec-path last-package-hierarchies))) |
318 | 318 |
319 (defun paths-find-data-directory (roots) | 319 (defun paths-find-data-directory (roots) |
320 "Find the data directory. | 320 "Find the data directory. |
321 ROOTS is the list of installation roots." | 321 ROOTS is the list of installation roots." |
322 (paths-find-version-directory roots "etc" nil "EMACSDATA" configure-data-directory)) | 322 (paths-find-version-directory roots (list "etc") nil "EMACSDATA" configure-data-directory)) |
323 | 323 |
324 (defun paths-construct-data-directory-list (data-directory | 324 (defun paths-construct-data-directory-list (data-directory |
325 early-package-hierarchies | 325 early-package-hierarchies |
326 late-package-hierarchies | 326 late-package-hierarchies |
327 last-package-hierarchies) | 327 last-package-hierarchies) |