Commit | Line | Data |
---|---|---|
0d20f9a0 JB |
1 | ;;Load up standardly loaded Lisp files for Emacs. |
2 | ;; This is loaded into a bare Emacs to make a dumpable one. | |
08564963 | 3 | ;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. |
0d20f9a0 JB |
4 | |
5 | ;; This file is part of GNU Emacs. | |
6 | ||
7 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
8 | ;; it under the terms of the GNU General Public License as published by | |
9 | ;; the Free Software Foundation; either version 1, or (at your option) | |
10 | ;; any later version. | |
11 | ||
12 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;; GNU General Public License for more details. | |
16 | ||
17 | ;; You should have received a copy of the GNU General Public License | |
18 | ;; along with GNU Emacs; see the file COPYING. If not, write to | |
19 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
20 | ||
21 | ||
22 | (load "subr") | |
d47099af | 23 | (load "map-ynp") |
0d20f9a0 JB |
24 | (garbage-collect) |
25 | (load "loaddefs.el") ;Don't get confused if someone compiled loaddefs by mistake. | |
26 | (garbage-collect) | |
27 | (load "simple") | |
28 | (garbage-collect) | |
29 | (load "help") | |
30 | (garbage-collect) | |
31 | (load "files") | |
32 | (garbage-collect) | |
33 | (load "indent") | |
34 | (load "window") | |
996896e6 JB |
35 | (garbage-collect) |
36 | (if (fboundp 'delete-screen) | |
37 | (load "screen")) | |
0d20f9a0 JB |
38 | (load "paths.el") ;Don't get confused if someone compiled paths by mistake. |
39 | (garbage-collect) | |
40 | (load "startup") | |
41 | (load "lisp") | |
42 | (garbage-collect) | |
43 | (load "page") | |
44 | (load "register") | |
45 | (garbage-collect) | |
46 | (load "paragraphs") | |
47 | (load "lisp-mode") | |
48 | (garbage-collect) | |
49 | (load "text-mode") | |
50 | (load "fill") | |
51 | (garbage-collect) | |
52 | (load "c-mode") | |
53 | (garbage-collect) | |
54 | (load "isearch") | |
55 | (garbage-collect) | |
56 | (load "replace") | |
57 | (if (eq system-type 'vax-vms) | |
58 | (progn | |
59 | (garbage-collect) | |
60 | (load "vmsproc"))) | |
61 | (garbage-collect) | |
62 | (load "abbrev") | |
63 | (garbage-collect) | |
64 | (load "buff-menu") | |
65 | (if (eq system-type 'vax-vms) | |
66 | (progn | |
67 | (garbage-collect) | |
68 | (load "vms-patch"))) | |
69 | (if (fboundp 'atan) ; preload some constants and | |
70 | (progn ; floating pt. functions if | |
71 | (garbage-collect) ; we have float support. | |
72 | (load "float-sup"))) | |
73 | ||
74 | ;If you want additional libraries to be preloaded and their | |
75 | ;doc strings kept in the DOC file rather than in core, | |
76 | ;you may load them with a "site-load.el" file. | |
77 | ;But you must also cause them to be scanned when the DOC file | |
87855006 | 78 | ;is generated. For VMS, you must edit ../vms/makedoc.com. |
0d20f9a0 JB |
79 | ;For other systems, you must edit ../src/ymakefile. |
80 | (if (load "site-load" t) | |
81 | (garbage-collect)) | |
82 | ||
83 | (load "version.el") ;Don't get confused if someone compiled version.el by mistake. | |
84 | ||
85 | ;; Note: all compiled Lisp files loaded above this point | |
86 | ;; must be among the ones parsed by make-docfile | |
87 | ;; to construct DOC. Any that are not processed | |
88 | ;; for DOC will not have doc strings in the dumped Emacs. | |
89 | ||
90 | (message "Finding pointers to doc strings...") | |
91 | (if (fboundp 'dump-emacs) | |
92 | (let ((name emacs-version)) | |
93 | (while (string-match "[^-+_.a-zA-Z0-9]+" name) | |
94 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) | |
95 | "-" | |
96 | (substring name (match-end 0))))) | |
08564963 JB |
97 | (copy-file (expand-file-name "../etc/DOC") |
98 | (concat (expand-file-name "../etc/DOC-") name) | |
0d20f9a0 JB |
99 | t) |
100 | (Snarf-documentation (concat "DOC-" name))) | |
101 | (Snarf-documentation "DOC")) | |
102 | (message "Finding pointers to doc strings...done") | |
103 | ||
104 | ;Note: You can cause additional libraries to be preloaded | |
105 | ;by writing a site-init.el that loads them. | |
106 | ;See also "site-load" above. | |
107 | (load "site-init" t) | |
108 | (garbage-collect) | |
109 | ||
110 | (if (or (equal (nth 3 command-line-args) "dump") | |
111 | (equal (nth 4 command-line-args) "dump")) | |
112 | (if (eq system-type 'vax-vms) | |
113 | (progn | |
114 | (message "Dumping data as file temacs.dump") | |
115 | (dump-emacs "temacs.dump" "temacs") | |
116 | (kill-emacs)) | |
117 | (let ((name (concat "emacs-" emacs-version))) | |
118 | (while (string-match "[^-+_.a-zA-Z0-9]+" name) | |
119 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) | |
120 | "-" | |
121 | (substring name (match-end 0))))) | |
122 | (message "Dumping under names xemacs and %s" name)) | |
123 | (condition-case () | |
124 | (delete-file "xemacs") | |
125 | (file-error nil)) | |
126 | (dump-emacs "xemacs" "temacs") | |
127 | ;; Recompute NAME now, so that it isn't set when we dump. | |
128 | (let ((name (concat "emacs-" emacs-version))) | |
129 | (while (string-match "[^-+_.a-zA-Z0-9]+" name) | |
130 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) | |
131 | "-" | |
132 | (substring name (match-end 0))))) | |
133 | (add-name-to-file "xemacs" name t)) | |
134 | (kill-emacs))) | |
135 | ||
136 | ;; Avoid error if user loads some more libraries now. | |
137 | (setq purify-flag nil) | |
138 | ||
139 | ;; For machines with CANNOT_DUMP defined in config.h, | |
140 | ;; this file must be loaded each time Emacs is run. | |
141 | ;; So run the startup code now. | |
142 | ||
143 | (or (fboundp 'dump-emacs) | |
144 | (eval top-level)) |