Mercurial > hg > xemacs-beta
comparison lisp/loadup.el @ 3511:1ee424086c62
[xemacs-hg @ 2006-07-16 12:23:57 by aidan]
Add docstrings to source-root, build-root, rename them
author | aidan |
---|---|
date | Sun, 16 Jul 2006 12:23:58 +0000 |
parents | f4e405a9d18d |
children | 6b2ef948e140 |
comparison
equal
deleted
inserted
replaced
3510:06a586083be3 | 3511:1ee424086c62 |
---|---|
45 ;(princ (format "lisp-directory: %S\n" lisp-directory)) | 45 ;(princ (format "lisp-directory: %S\n" lisp-directory)) |
46 | 46 |
47 (when (fboundp 'error) | 47 (when (fboundp 'error) |
48 (error "loadup.el already loaded!")) | 48 (error "loadup.el already loaded!")) |
49 | 49 |
50 (defvar running-xemacs t | 50 (defconst running-xemacs t |
51 "Non-nil when the current emacs is XEmacs.") | 51 "Non-nil when the current emacs is XEmacs.") |
52 | |
53 ;; Can't make this constant for now because it causes an error in | |
54 ;; update-elc.el. | |
55 (defvar source-lisp (file-name-directory (expand-file-name | |
56 (nth 2 command-line-args))) | |
57 "Root of tree containing the Lisp source code for the current build. | |
58 Differs from `lisp-directory' if this XEmacs has been installed. ") | |
59 | |
60 (defconst build-directory (expand-file-name ".." invocation-directory) | |
61 "Root of tree containing object files and executables produced by build. | |
62 Differs from `source-directory' if configured with --srcdir option, a practice | |
63 recommended for developers.") | |
64 | |
65 (defconst source-directory (expand-file-name ".." source-lisp) | |
66 "Root of tree containing source code for the current build. | |
67 Used during loadup and for documenting source of symbols defined in C.") | |
68 | |
52 (defvar preloaded-file-list nil | 69 (defvar preloaded-file-list nil |
53 "List of files preloaded into the XEmacs binary image.") | 70 "List of files preloaded into the XEmacs binary image.") |
54 | 71 |
55 (defvar Installation-string nil | 72 (defvar Installation-string nil |
56 "Description of XEmacs installation.") | 73 "Description of XEmacs installation.") |
57 | |
58 (defvar build-root (expand-file-name ".." invocation-directory)) | |
59 (defvar source-lisp (file-name-directory (expand-file-name | |
60 (nth 2 command-line-args)))) | |
61 (defvar source-root (expand-file-name ".." source-lisp)) | |
62 ;(defvar build-lib-src (expand-file-name "lib-src" build-root)) | |
63 | 74 |
64 ;(start-profiling) | 75 ;(start-profiling) |
65 | 76 |
66 (let ((gc-cons-threshold | 77 (let ((gc-cons-threshold |
67 ;; setting it low makes loadup incredibly fucking slow. | 78 ;; setting it low makes loadup incredibly fucking slow. |
86 " *temp*"))) | 97 " *temp*"))) |
87 ;; insert-file-contents-internal bogusly calls | 98 ;; insert-file-contents-internal bogusly calls |
88 ;; format-decode without checking if it's defined. | 99 ;; format-decode without checking if it's defined. |
89 (fset 'format-decode #'(lambda (f l &optional v) l)) | 100 (fset 'format-decode #'(lambda (f l &optional v) l)) |
90 (insert-file-contents-internal | 101 (insert-file-contents-internal |
91 (expand-file-name "Installation" build-root)) | 102 (expand-file-name "Installation" build-directory)) |
92 (fmakunbound 'format-decode) | 103 (fmakunbound 'format-decode) |
93 (prog1 (buffer-substring) | 104 (prog1 (buffer-substring) |
94 (kill-buffer (current-buffer))))) | 105 (kill-buffer (current-buffer))))) |
95 | 106 |
96 (setq load-path (list source-lisp)) | 107 (setq load-path (list source-lisp)) |
97 (setq module-load-path (list (expand-file-name "modules" build-root))) | 108 (setq module-load-path (list |
109 (expand-file-name "modules" build-directory))) | |
98 | 110 |
99 ;; message not defined yet ... | 111 ;; message not defined yet ... |
100 (external-debugging-output (format "\nUsing load-path %s" load-path)) | 112 (external-debugging-output (format "\nUsing load-path %s" load-path)) |
101 (external-debugging-output (format "\nUsing module-load-path %s" | 113 (external-debugging-output (format "\nUsing module-load-path %s" |
102 module-load-path)) | 114 module-load-path)) |
161 | 173 |
162 ;; We cannot do this in mule-cmds.el because not all the | 174 ;; We cannot do this in mule-cmds.el because not all the |
163 ;; appropriate charsets are loaded yet. | 175 ;; appropriate charsets are loaded yet. |
164 (when (and (featurep 'mule) | 176 (when (and (featurep 'mule) |
165 load-unicode-tables-at-dump-time) | 177 load-unicode-tables-at-dump-time) |
166 (let ((data-directory (expand-file-name "etc" source-root))) | 178 (let ((data-directory (expand-file-name "etc" source-directory))) |
167 (load-unicode-tables))) | 179 (load-unicode-tables))) |
168 | 180 |
169 (packages-load-package-dumped-lisps late-package-load-path) | 181 (packages-load-package-dumped-lisps late-package-load-path) |
170 | 182 |
171 )) ;; end of call-with-condition-handler | 183 )) ;; end of call-with-condition-handler |