428
|
1 ;; dump-paths.el --- set up XEmacs paths for dumping
|
|
2
|
|
3 ;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc.
|
|
4
|
|
5 ;; Maintainer: XEmacs Development Team
|
|
6 ;; Keywords: internal, dumped
|
|
7
|
|
8 ;; This file is part of XEmacs.
|
|
9
|
|
10 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
11 ;; under the terms of the GNU General Public License as published by
|
|
12 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
13 ;; any later version.
|
|
14
|
|
15 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
18 ;; General Public License for more details.
|
|
19
|
|
20 ;; You should have received a copy of the GNU General Public License
|
|
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
23 ;; 02111-1307, USA.
|
|
24
|
|
25 ;;; Synched up with: Not in FSF
|
|
26
|
|
27 ;;; Commentary:
|
|
28
|
|
29 ;; This sets up the various paths for continuing loading files for
|
|
30 ;; dumping.
|
450
|
31 ;; #### This code is duplicated in startup.el (startup-setup-paths).
|
428
|
32
|
|
33 (let ((debug-paths (or debug-paths
|
|
34 (and (getenv "EMACSDEBUGPATHS")
|
|
35 t)))
|
|
36 (roots (paths-find-emacs-roots invocation-directory
|
|
37 invocation-name)))
|
|
38
|
|
39 (if debug-paths
|
|
40 (princ (format "XEmacs thinks the roots of its hierarchy are:\n%S\n"
|
|
41 roots)))
|
|
42
|
|
43 (let* ((package-locations
|
|
44 (packages-compute-package-locations
|
|
45 ;; temporary kludge:
|
|
46 ;; this should be synched with startup.el
|
|
47 (paths-construct-path '("~" ".xemacs"))))
|
|
48 (stuff (packages-find-packages roots package-locations)))
|
|
49 (setq late-packages (car (cdr stuff))))
|
|
50
|
|
51 (setq late-package-load-path (packages-find-package-load-path late-packages))
|
|
52
|
|
53 (if debug-paths
|
|
54 (progn
|
|
55 (princ (format "configure-package-path:\n%S\n" configure-package-path)
|
|
56 'external-debugging-output)
|
|
57 (princ (format "late-packages and late-package-load-path:\n%S\n%S\n"
|
|
58 late-packages late-package-load-path)
|
|
59 'external-debugging-output)))
|
|
60
|
|
61 (setq lisp-directory (paths-find-lisp-directory roots))
|
|
62 (if debug-paths
|
|
63 (princ (format "lisp-directory:\n%S\n" lisp-directory)
|
|
64 'external-debugging-output))
|
460
|
65 (if (featurep 'mule)
|
|
66 (progn
|
|
67 (setq mule-lisp-directory
|
|
68 (paths-find-mule-lisp-directory roots
|
|
69 lisp-directory))
|
|
70 (if debug-paths
|
|
71 (princ (format "mule-lisp-directory:\n%S\n"
|
|
72 mule-lisp-directory)
|
|
73 'external-debugging-output)))
|
|
74 (setq mule-lisp-directory '()))
|
428
|
75 (setq site-directory (and (null inhibit-site-lisp)
|
|
76 (paths-find-site-lisp-directory roots)))
|
|
77 (if (and debug-paths (null inhibit-site-lisp))
|
|
78 (princ (format "site-directory:\n%S\n" site-directory)
|
|
79 'external-debugging-output))
|
|
80
|
|
81 (setq load-path (paths-construct-load-path roots
|
|
82 '()
|
|
83 late-package-load-path
|
|
84 '()
|
|
85 lisp-directory
|
460
|
86 site-directory
|
|
87 mule-lisp-directory))
|
428
|
88
|
|
89 (setq module-directory (paths-find-module-directory roots))
|
|
90 (if debug-paths
|
|
91 (princ (format "module-directory:\n%S\n" module-directory)
|
|
92 'external-debugging-output))
|
|
93 (setq site-module-directory (and (null inhibit-site-modules)
|
|
94 (paths-find-site-module-directory roots)))
|
|
95 (if (and debug-paths (null inhibit-site-modules))
|
|
96 (princ (format "site-module-directory:\n%S\n" site-module-directory)
|
|
97 'external-debugging-output))
|
|
98
|
|
99 (setq module-load-path (paths-construct-module-load-path roots
|
|
100 module-directory
|
|
101 site-module-directory)))
|
|
102
|
|
103 ;;; dump-paths.el ends here
|