Mercurial > emacs
comparison lisp/loadup.el @ 35:63b375f17a65
Initial revision
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 31 Oct 1989 15:59:53 +0000 |
parents | |
children | 9827fd4d86a0 |
comparison
equal
deleted
inserted
replaced
34:edf8af31003b | 35:63b375f17a65 |
---|---|
1 ;;Load up standardly loaded Lisp files for Emacs. | |
2 ;; This is loaded into a bare Emacs to make a dumpable one. | |
3 ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc. | |
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") | |
23 (garbage-collect) | |
24 (load "loaddefs.el") ;Don't get confused if someone compiled loaddefs by mistake. | |
25 (garbage-collect) | |
26 (load "simple") | |
27 (garbage-collect) | |
28 (load "help") | |
29 (garbage-collect) | |
30 (load "files") | |
31 (garbage-collect) | |
32 (load "indent") | |
33 (load "window") | |
34 (load "paths.el") ;Don't get confused if someone compiled paths by mistake. | |
35 (garbage-collect) | |
36 (load "startup") | |
37 (load "lisp") | |
38 (garbage-collect) | |
39 (load "page") | |
40 (load "register") | |
41 (garbage-collect) | |
42 (load "paragraphs") | |
43 (load "lisp-mode") | |
44 (garbage-collect) | |
45 (load "text-mode") | |
46 (load "fill") | |
47 (garbage-collect) | |
48 (load "c-mode") | |
49 (garbage-collect) | |
50 (load "isearch") | |
51 (garbage-collect) | |
52 (load "replace") | |
53 (if (eq system-type 'vax-vms) | |
54 (progn | |
55 (garbage-collect) | |
56 (load "vmsproc"))) | |
57 (garbage-collect) | |
58 (load "abbrev") | |
59 (garbage-collect) | |
60 (load "buff-menu") | |
61 (if (eq system-type 'vax-vms) | |
62 (progn | |
63 (garbage-collect) | |
64 (load "vms-patch"))) | |
65 (if (fboundp 'atan) ; preload some constants and | |
66 (progn ; floating pt. functions if | |
67 (garbage-collect) ; we have float support. | |
68 (load "float-sup"))) | |
69 | |
70 ;If you want additional libraries to be preloaded and their | |
71 ;doc strings kept in the DOC file rather than in core, | |
72 ;you may load them with a "site-load.el" file. | |
73 ;But you must also cause them to be scanned when the DOC file | |
74 ;is generated. For VMS, you must edit ../etc/makedoc.com. | |
75 ;For other systems, you must edit ../src/ymakefile. | |
76 (if (load "site-load" t) | |
77 (garbage-collect)) | |
78 | |
79 (load "version.el") ;Don't get confused if someone compiled version.el by mistake. | |
80 | |
81 ;; Note: all compiled Lisp files loaded above this point | |
82 ;; must be among the ones parsed by make-docfile | |
83 ;; to construct DOC. Any that are not processed | |
84 ;; for DOC will not have doc strings in the dumped Emacs. | |
85 | |
86 (message "Finding pointers to doc strings...") | |
87 (if (fboundp 'dump-emacs) | |
88 (let ((name emacs-version)) | |
89 (while (string-match "[^-+_.a-zA-Z0-9]+" name) | |
90 (setq name (concat (downcase (substring name 0 (match-beginning 0))) | |
91 "-" | |
92 (substring name (match-end 0))))) | |
93 (copy-file (expand-file-name "../etc/DOC") | |
94 (concat (expand-file-name "../etc/DOC-") name) | |
95 t) | |
96 (Snarf-documentation (concat "DOC-" name))) | |
97 (Snarf-documentation "DOC")) | |
98 (message "Finding pointers to doc strings...done") | |
99 | |
100 ;Note: You can cause additional libraries to be preloaded | |
101 ;by writing a site-init.el that loads them. | |
102 ;See also "site-load" above. | |
103 (load "site-init" t) | |
104 (garbage-collect) | |
105 | |
106 (if (or (equal (nth 3 command-line-args) "dump") | |
107 (equal (nth 4 command-line-args) "dump")) | |
108 (if (eq system-type 'vax-vms) | |
109 (progn | |
110 (message "Dumping data as file temacs.dump") | |
111 (dump-emacs "temacs.dump" "temacs") | |
112 (kill-emacs)) | |
113 (let ((name (concat "emacs-" emacs-version))) | |
114 (while (string-match "[^-+_.a-zA-Z0-9]+" name) | |
115 (setq name (concat (downcase (substring name 0 (match-beginning 0))) | |
116 "-" | |
117 (substring name (match-end 0))))) | |
118 (message "Dumping under names xemacs and %s" name)) | |
119 (condition-case () | |
120 (delete-file "xemacs") | |
121 (file-error nil)) | |
122 (dump-emacs "xemacs" "temacs") | |
123 ;; Recompute NAME now, so that it isn't set when we dump. | |
124 (let ((name (concat "emacs-" emacs-version))) | |
125 (while (string-match "[^-+_.a-zA-Z0-9]+" name) | |
126 (setq name (concat (downcase (substring name 0 (match-beginning 0))) | |
127 "-" | |
128 (substring name (match-end 0))))) | |
129 (add-name-to-file "xemacs" name t)) | |
130 (kill-emacs))) | |
131 | |
132 ;; Avoid error if user loads some more libraries now. | |
133 (setq purify-flag nil) | |
134 | |
135 ;; For machines with CANNOT_DUMP defined in config.h, | |
136 ;; this file must be loaded each time Emacs is run. | |
137 ;; So run the startup code now. | |
138 | |
139 (or (fboundp 'dump-emacs) | |
140 (eval top-level)) |