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.
24 (load "loaddefs.el") ;Don't get confused if someone compiled loaddefs by mistake.
34 (load "paths.el") ;Don't get confused if someone compiled paths by mistake.
53 (if (eq system-type
'vax-vms
)
61 (if (eq system-type
'vax-vms
)
65 (if (fboundp 'atan
) ; preload some constants and
66 (progn ; floating pt. functions if
67 (garbage-collect) ; we have float support.
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
)
79 (load "version.el") ;Don't get confused if someone compiled version.el by mistake.
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.
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)))
92 (substring name
(match-end 0)))))
93 (copy-file (expand-file-name "../etc/DOC")
94 (concat (expand-file-name "../etc/DOC-") name
)
96 (Snarf-documentation (concat "DOC-" name
)))
97 (Snarf-documentation "DOC"))
98 (message "Finding pointers to doc strings...done")
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.
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
)
110 (message "Dumping data as file temacs.dump")
111 (dump-emacs "temacs.dump" "temacs")
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)))
117 (substring name
(match-end 0)))))
118 (message "Dumping under names xemacs and %s" name
))
120 (delete-file "xemacs")
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)))
128 (substring name
(match-end 0)))))
129 (add-name-to-file "xemacs" name t
))
132 ;; Avoid error if user loads some more libraries now.
133 (setq purify-flag nil
)
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.
139 (or (fboundp 'dump-emacs
)