38412
|
1 ;;; loadup.el --- load up standardly loaded Lisp files for Emacs
|
659
|
2
|
39729
|
3 ;; Copyright (C) 1985, 1986, 1992, 1994, 2001 Free Software Foundation, Inc.
|
840
|
4
|
807
|
5 ;; Maintainer: FSF
|
811
|
6 ;; Keywords: internal
|
807
|
7
|
35
|
8 ;; This file is part of GNU Emacs.
|
|
9
|
|
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
|
|
11 ;; it under the terms of the GNU General Public License as published by
|
807
|
12 ;; the Free Software Foundation; either version 2, or (at your option)
|
35
|
13 ;; any later version.
|
|
14
|
|
15 ;; GNU Emacs is distributed in the hope that it will be useful,
|
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18 ;; GNU General Public License for more details.
|
|
19
|
|
20 ;; You should have received a copy of the GNU General Public License
|
14169
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
23 ;; Boston, MA 02111-1307, USA.
|
35
|
24
|
840
|
25 ;;; Commentary:
|
|
26
|
|
27 ;; This is loaded into a bare Emacs to make a dumpable one.
|
|
28
|
807
|
29 ;;; Code:
|
|
30
|
26002
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
31 ;; add subdirectories to the load-path for files that might
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
32 ;; get autoloaded when bootstrapping
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
33 (if (or (equal (nth 3 command-line-args) "bootstrap")
|
33103
|
34 (equal (nth 4 command-line-args) "bootstrap")
|
|
35 ;; in case CANNOT_DUMP
|
|
36 (equal (nth 0 command-line-args) "../src/bootstrap-emacs"))
|
49333
|
37 (let ((dir (car load-path)))
|
44595
|
38 ;; We'll probably overflow the pure space.
|
|
39 (setq purify-flag nil)
|
49333
|
40 (setq load-path (list dir
|
|
41 (expand-file-name "emacs-lisp" dir)
|
|
42 (expand-file-name "language" dir)
|
|
43 (expand-file-name "international" dir)
|
|
44 (expand-file-name "textmodes" dir)))))
|
26002
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
45
|
1692
|
46 (message "Using load-path %s" load-path)
|
|
47
|
44015
|
48 ;; We don't want to have any undo records in the dumped Emacs.
|
648
|
49 (buffer-disable-undo "*scratch*")
|
35
|
50
|
51354
abad152707e5
Load byte-run.el, map-ynp.el, timer.el and float-sup.el from emacs-lisp.
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
51 (load "emacs-lisp/byte-run")
|
44015
|
52 (load "emacs-lisp/backquote")
|
35
|
53 (load "subr")
|
10806
|
54
|
|
55 ;; We specify .el in case someone compiled version.el by mistake.
|
|
56 (load "version.el")
|
|
57
|
17397
|
58 (load "widget")
|
|
59 (load "custom")
|
51354
abad152707e5
Load byte-run.el, map-ynp.el, timer.el and float-sup.el from emacs-lisp.
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
60 (load "emacs-lisp/map-ynp")
|
28916
|
61 (load "env")
|
17427
|
62 (load "cus-start")
|
18595
|
63 (load "international/mule")
|
|
64 (load "international/mule-conf.el") ;Don't get confused if someone compiled this by mistake.
|
22965
|
65 (load "format")
|
17783
|
66 (load "bindings")
|
|
67 (setq load-source-file-function 'load-with-code-conversion)
|
35
|
68 (load "files")
|
22258
|
69
|
44894
|
70 (load "cus-face")
|
39650
|
71 (load "faces") ; after here, `defface' may be used.
|
|
72
|
23013
|
73 (message "Lists of integers (garbage collection statistics) are normal output")
|
|
74 (message "while building Emacs; they do not indicate a problem.")
|
22258
|
75 (message "%s" (garbage-collect))
|
|
76 (load "loaddefs.el") ;Don't get confused if someone compiled this by mistake.
|
|
77 (message "%s" (garbage-collect))
|
47407
|
78 (load "simple")
|
22258
|
79
|
32205
|
80 (load "help")
|
39650
|
81
|
32205
|
82 ;; Any Emacs Lisp source file (*.el) loaded here after can contain
|
|
83 ;; multilingual text.
|
|
84 (load "international/mule-cmds")
|
|
85 (load "case-table")
|
46509
|
86 (load "international/utf-8")
|
47706
|
87 (load "international/utf-16")
|
32205
|
88 (load "international/characters")
|
|
89
|
17951
|
90 (let ((set-case-syntax-set-multibyte t))
|
18595
|
91 (load "international/latin-1")
|
|
92 (load "international/latin-2")
|
|
93 (load "international/latin-3")
|
|
94 (load "international/latin-4")
|
26128
|
95 (load "international/latin-5")
|
|
96 (load "international/latin-8")
|
|
97 (load "international/latin-9"))
|
22965
|
98 ;; Load language-specific files.
|
17007
|
99 (load "language/chinese")
|
|
100 (load "language/cyrillic")
|
|
101 (load "language/indian")
|
49712
|
102 (load "language/devanagari") ; This should be loaded after indian.
|
|
103 (load "language/malayalam") ; This should be loaded after indian.
|
|
104 (load "language/tamil") ; This should be loaded after indian.
|
17292
|
105 (load "language/english")
|
17007
|
106 (load "language/ethiopic")
|
|
107 (load "language/european")
|
21208
|
108 (load "language/czech")
|
|
109 (load "language/slovak")
|
21541
|
110 (load "language/romanian")
|
17007
|
111 (load "language/greek")
|
|
112 (load "language/hebrew")
|
|
113 (load "language/japanese")
|
|
114 (load "language/korean")
|
17089
|
115 (load "language/lao")
|
17007
|
116 (load "language/thai")
|
17292
|
117 (load "language/tibetan")
|
17007
|
118 (load "language/vietnamese")
|
|
119 (load "language/misc-lang")
|
42143
|
120 (load "language/utf-8-lang")
|
|
121 (load "language/georgian")
|
44015
|
122
|
|
123 (load "international/ucs-tables")
|
|
124
|
22878
|
125 (update-coding-systems-internal)
|
22258
|
126
|
35
|
127 (load "indent")
|
|
128 (load "window")
|
16174
|
129 (load "frame")
|
26736
|
130 (load "term/tty-colors")
|
45446
|
131 (load "font-core")
|
39650
|
132
|
11040
|
133 (if (fboundp 'frame-face-alist)
|
|
134 (progn
|
|
135 (load "facemenu")))
|
|
136 (if (fboundp 'track-mouse)
|
|
137 (progn
|
|
138 (load "mouse")
|
34872
|
139 (and (boundp 'x-toolkit-scroll-bars)
|
25121
|
140 (load "scroll-bar"))
|
2806
|
141 (load "select")))
|
51354
abad152707e5
Load byte-run.el, map-ynp.el, timer.el and float-sup.el from emacs-lisp.
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
142 (load "emacs-lisp/timer")
|
32081
|
143 (load "isearch")
|
22258
|
144
|
|
145 (message "%s" (garbage-collect))
|
13375
|
146 (load "menu-bar")
|
35
|
147 (load "paths.el") ;Don't get confused if someone compiled paths by mistake.
|
|
148 (load "startup")
|
18595
|
149 (load "emacs-lisp/lisp")
|
|
150 (load "textmodes/page")
|
35
|
151 (load "register")
|
18595
|
152 (load "textmodes/paragraphs")
|
|
153 (load "emacs-lisp/lisp-mode")
|
|
154 (load "textmodes/text-mode")
|
|
155 (load "textmodes/fill")
|
22258
|
156 (message "%s" (garbage-collect))
|
|
157
|
35
|
158 (load "replace")
|
|
159 (if (eq system-type 'vax-vms)
|
|
160 (progn
|
|
161 (load "vmsproc")))
|
|
162 (load "abbrev")
|
|
163 (load "buff-menu")
|
|
164 (if (eq system-type 'vax-vms)
|
|
165 (progn
|
|
166 (load "vms-patch")))
|
9783
|
167 (if (eq system-type 'windows-nt)
|
|
168 (progn
|
|
169 (load "ls-lisp")
|
15086
|
170 (load "disp-table") ; needed to setup ibm-pc char set, see internal.el
|
16593
|
171 (load "dos-w32")
|
42849
|
172 (load "w32-vars")
|
19356
|
173 (load "w32-fns")))
|
5459
|
174 (if (eq system-type 'ms-dos)
|
|
175 (progn
|
|
176 (load "ls-lisp")
|
16593
|
177 (load "dos-w32")
|
5459
|
178 (load "dos-fns")
|
22071
|
179 (load "dos-vars")
|
35952
|
180 (load "international/ccl") ; codepage.el uses CCL en/decoder
|
24709
|
181 (load "international/codepage") ; internal.el uses cpNNN coding systems
|
19356
|
182 (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el
|
34467
|
183 (if (eq system-type 'macos)
|
|
184 (progn
|
|
185 (load "ls-lisp")))
|
34351
|
186 (if (fboundp 'atan) ; preload some constants and
|
19356
|
187 (progn ; floating pt. functions if we have float support.
|
51354
abad152707e5
Load byte-run.el, map-ynp.el, timer.el and float-sup.el from emacs-lisp.
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
188 (load "emacs-lisp/float-sup")))
|
22258
|
189 (message "%s" (garbage-collect))
|
9442
|
190
|
927
|
191 (load "vc-hooks")
|
13134
|
192 (load "ediff-hook")
|
22258
|
193 (message "%s" (garbage-collect))
|
35
|
194
|
|
195 ;If you want additional libraries to be preloaded and their
|
|
196 ;doc strings kept in the DOC file rather than in core,
|
|
197 ;you may load them with a "site-load.el" file.
|
|
198 ;But you must also cause them to be scanned when the DOC file
|
445
|
199 ;is generated. For VMS, you must edit ../vms/makedoc.com.
|
13316
|
200 ;For other systems, you must edit ../src/Makefile.in.
|
35
|
201 (if (load "site-load" t)
|
|
202 (garbage-collect))
|
|
203
|
12299
|
204 (if (fboundp 'x-popup-menu)
|
|
205 (precompute-menubar-bindings))
|
|
206 ;; Turn on recording of which commands get rebound,
|
|
207 ;; for the sake of the next call to precompute-menubar-bindings.
|
|
208 (setq define-key-rebound-commands nil)
|
|
209
|
5489
|
210 ;; Determine which last version number to use
|
|
211 ;; based on the executables that now exist.
|
6540
|
212 (if (and (or (equal (nth 3 command-line-args) "dump")
|
|
213 (equal (nth 4 command-line-args) "dump"))
|
|
214 (not (eq system-type 'ms-dos)))
|
13342
f68eab5a63d2
(finding existing executable versions): Add a period to the end of BASE.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
215 (let* ((base (concat "emacs-" emacs-version "."))
|
5489
|
216 (files (file-name-all-completions base default-directory))
|
|
217 (versions (mapcar (function (lambda (name)
|
13366
|
218 (string-to-int (substring name (length base)))))
|
5489
|
219 files)))
|
44015
|
220 ;; `emacs-version' is a constant, so we shouldn't change it with `setq'.
|
|
221 (defconst emacs-version
|
|
222 (format "%s.%d"
|
|
223 emacs-version (if versions (1+ (apply 'max versions)) 1)))))
|
5489
|
224
|
35
|
225 ;; Note: all compiled Lisp files loaded above this point
|
|
226 ;; must be among the ones parsed by make-docfile
|
|
227 ;; to construct DOC. Any that are not processed
|
|
228 ;; for DOC will not have doc strings in the dumped Emacs.
|
|
229
|
|
230 (message "Finding pointers to doc strings...")
|
6540
|
231 (if (or (equal (nth 3 command-line-args) "dump")
|
|
232 (equal (nth 4 command-line-args) "dump"))
|
35
|
233 (let ((name emacs-version))
|
|
234 (while (string-match "[^-+_.a-zA-Z0-9]+" name)
|
|
235 (setq name (concat (downcase (substring name 0 (match-beginning 0)))
|
|
236 "-"
|
|
237 (substring name (match-end 0)))))
|
9783
|
238 (if (memq system-type '(ms-dos windows-nt))
|
9572
|
239 (setq name (expand-file-name
|
15398
e0d50fe661c0
On MSDOS, don't assume that `make-frame' is only bound under an X
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
240 (if (fboundp 'x-create-frame) "DOC-X" "DOC") "../etc"))
|
5459
|
241 (setq name (concat (expand-file-name "../etc/DOC-") name))
|
|
242 (if (file-exists-p name)
|
|
243 (delete-file name))
|
|
244 (copy-file (expand-file-name "../etc/DOC") name t))
|
1065
|
245 (Snarf-documentation (file-name-nondirectory name)))
|
26002
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
246 (condition-case nil
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
247 (Snarf-documentation "DOC")
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
248 (error nil)))
|
35
|
249 (message "Finding pointers to doc strings...done")
|
|
250
|
22357
|
251 ;;;Note: You can cause additional libraries to be preloaded
|
|
252 ;;;by writing a site-init.el that loads them.
|
|
253 ;;;See also "site-load" above.
|
35
|
254 (load "site-init" t)
|
8184
|
255 (setq current-load-list nil)
|
23286
|
256
|
23575
|
257 ;; Write the value of load-history into fns-VERSION.el,
|
|
258 ;; then clear out load-history.
|
44444
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
259 ;; (if (or (equal (nth 3 command-line-args) "dump")
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
260 ;; (equal (nth 4 command-line-args) "dump"))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
261 ;; (let ((buffer-undo-list t))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
262 ;; (princ "(setq load-history\n" (current-buffer))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
263 ;; (princ " (nconc load-history\n" (current-buffer))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
264 ;; (princ " '(" (current-buffer))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
265 ;; (let ((tem load-history))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
266 ;; (while tem
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
267 ;; (prin1 (car tem) (current-buffer))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
268 ;; (terpri (current-buffer))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
269 ;; (if (cdr tem)
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
270 ;; (princ " " (current-buffer)))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
271 ;; (setq tem (cdr tem))))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
272 ;; (princ ")))\n" (current-buffer))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
273 ;; (write-region (point-min) (point-max)
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
274 ;; (expand-file-name
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
275 ;; (cond
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
276 ;; ((eq system-type 'ms-dos)
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
277 ;; "../lib-src/fns.el")
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
278 ;; ((eq system-type 'windows-nt)
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
279 ;; (format "../../../lib-src/fns-%s.el" emacs-version))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
280 ;; (t
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
281 ;; (format "../lib-src/fns-%s.el" emacs-version)))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
282 ;; invocation-directory))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
283 ;; (erase-buffer)
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
284 ;; (setq load-history nil))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
285 ;; (setq symbol-file-load-history-loaded t))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
286 ;; We don't use this fns-*.el file. Instead we keep the data in PURE space.
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
287 ;; Make sure that the spine of the list is not in pure space because it can
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
288 ;; be destructively mutated in lread.c:build_load_history.
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
289 (setq load-history (mapcar 'purecopy load-history))
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
290 (setq symbol-file-load-history-loaded t)
|
377def17ab0f
Call ucs-unify-8859 directly rather than unify-8859-on-encoding-mode.
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
291
|
23575
|
292 (set-buffer-modified-p nil)
|
23286
|
293
|
26002
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
294 ;; reset the load-path. See lread.c:init_lread why.
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
295 (if (or (equal (nth 3 command-line-args) "bootstrap")
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
296 (equal (nth 4 command-line-args) "bootstrap"))
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
297 (setcdr load-path nil))
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
298
|
35
|
299 (garbage-collect)
|
|
300
|
648
|
301 ;;; At this point, we're ready to resume undo recording for scratch.
|
|
302 (buffer-enable-undo "*scratch*")
|
|
303
|
51699
|
304 (if (null (garbage-collect))
|
|
305 (setq pure-space-overflow t))
|
|
306
|
26002
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
307 (if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
|
4f46db3c9d7d
* subr.el (with-current-buffer): don't use backquotes to avoid
Stefan Monnier <monnier@iro.umontreal.ca>
diff
changeset
|
308 (member (nth 4 command-line-args) '("dump" "bootstrap")))
|
35
|
309 (if (eq system-type 'vax-vms)
|
34351
|
310 (progn
|
35
|
311 (message "Dumping data as file temacs.dump")
|
|
312 (dump-emacs "temacs.dump" "temacs")
|
|
313 (kill-emacs))
|
|
314 (let ((name (concat "emacs-" emacs-version)))
|
|
315 (while (string-match "[^-+_.a-zA-Z0-9]+" name)
|
|
316 (setq name (concat (downcase (substring name 0 (match-beginning 0)))
|
|
317 "-"
|
|
318 (substring name (match-end 0)))))
|
5459
|
319 (if (eq system-type 'ms-dos)
|
|
320 (message "Dumping under the name emacs")
|
|
321 (message "Dumping under names emacs and %s" name)))
|
35
|
322 (condition-case ()
|
1703
|
323 (delete-file "emacs")
|
35
|
324 (file-error nil))
|
1703
|
325 ;; We used to dump under the name xemacs, but that occasionally
|
|
326 ;; confused people installing Emacs (they'd install the file
|
|
327 ;; under the name `xemacs'), and it's inconsistent with every
|
22357
|
328 ;; other GNU program's build process.
|
1703
|
329 (dump-emacs "emacs" "temacs")
|
9752
|
330 (message "%d pure bytes used" pure-bytes-used)
|
35
|
331 ;; Recompute NAME now, so that it isn't set when we dump.
|
11398
|
332 (if (not (memq system-type '(ms-dos windows-nt)))
|
5459
|
333 (let ((name (concat "emacs-" emacs-version)))
|
|
334 (while (string-match "[^-+_.a-zA-Z0-9]+" name)
|
|
335 (setq name (concat (downcase (substring name 0 (match-beginning 0)))
|
|
336 "-"
|
|
337 (substring name (match-end 0)))))
|
|
338 (add-name-to-file "emacs" name t)))
|
35
|
339 (kill-emacs)))
|
|
340
|
|
341 ;; Avoid error if user loads some more libraries now.
|
|
342 (setq purify-flag nil)
|
|
343
|
|
344 ;; For machines with CANNOT_DUMP defined in config.h,
|
|
345 ;; this file must be loaded each time Emacs is run.
|
22358
|
346 ;; So run the startup code now. First, remove `-l loadup' from args.
|
35
|
347
|
22358
|
348 (if (and (equal (nth 1 command-line-args) "-l")
|
|
349 (equal (nth 2 command-line-args) "loadup"))
|
|
350 (setcdr command-line-args (nthcdr 3 command-line-args)))
|
|
351
|
|
352 (eval top-level)
|
659
|
353
|
44015
|
354
|
|
355 ;;; Local Variables:
|
|
356 ;;; no-byte-compile: t
|
|
357 ;;; no-update-autoloads: t
|
|
358 ;;; End:
|
659
|
359 ;;; loadup.el ends here
|