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.
5 ;; This file is part of GNU Emacs.
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)
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.
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.
25 (load "loaddefs.el") ;Don't get confused if someone compiled loaddefs by mistake.
36 (if (fboundp 'delete-screen
)
38 (load "paths.el") ;Don't get confused if someone compiled paths by mistake.
57 (if (eq system-type
'vax-vms
)
65 (if (eq system-type
'vax-vms
)
69 (if (fboundp 'atan
) ; preload some constants and
70 (progn ; floating pt. functions if
71 (garbage-collect) ; we have float support.
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
78 ;is generated. For VMS, you must edit ../vms/makedoc.com.
79 ;For other systems, you must edit ../src/ymakefile.
80 (if (load "site-load" t
)
83 (load "version.el") ;Don't get confused if someone compiled version.el by mistake.
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.
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)))
96 (substring name
(match-end 0)))))
97 (copy-file (expand-file-name "../share-lib/DOC")
98 (concat (expand-file-name "../share-lib/DOC-") name
)
100 (Snarf-documentation (concat "DOC-" name
)))
101 (Snarf-documentation "DOC"))
102 (message "Finding pointers to doc strings...done")
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.
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
)
114 (message "Dumping data as file temacs.dump")
115 (dump-emacs "temacs.dump" "temacs")
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)))
121 (substring name
(match-end 0)))))
122 (message "Dumping under names xemacs and %s" name
))
124 (delete-file "xemacs")
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)))
132 (substring name
(match-end 0)))))
133 (add-name-to-file "xemacs" name t
))
136 ;; Avoid error if user loads some more libraries now.
137 (setq purify-flag nil
)
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.
143 (or (fboundp 'dump-emacs
)