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, 1992 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.
21 ;;; We don't want to have any undo records in the dumped Emacs.
22 (buffer-disable-undo "*scratch*")
27 (load "loaddefs.el") ;Don't get confused if someone compiled loaddefs by mistake.
38 (if (fboundp 'delete-screen
)
40 (load "paths.el") ;Don't get confused if someone compiled paths by mistake.
59 (if (eq system-type
'vax-vms
)
67 (if (eq system-type
'vax-vms
)
71 (if (fboundp 'atan
) ; preload some constants and
72 (progn ; floating pt. functions if
73 (garbage-collect) ; we have float support.
76 ;If you want additional libraries to be preloaded and their
77 ;doc strings kept in the DOC file rather than in core,
78 ;you may load them with a "site-load.el" file.
79 ;But you must also cause them to be scanned when the DOC file
80 ;is generated. For VMS, you must edit ../vms/makedoc.com.
81 ;For other systems, you must edit ../src/ymakefile.
82 (if (load "site-load" t
)
85 (load "version.el") ;Don't get confused if someone compiled version.el by mistake.
87 ;; Note: all compiled Lisp files loaded above this point
88 ;; must be among the ones parsed by make-docfile
89 ;; to construct DOC. Any that are not processed
90 ;; for DOC will not have doc strings in the dumped Emacs.
92 (message "Finding pointers to doc strings...")
93 (if (fboundp 'dump-emacs
)
94 (let ((name emacs-version
))
95 (while (string-match "[^-+_.a-zA-Z0-9]+" name
)
96 (setq name
(concat (downcase (substring name
0 (match-beginning 0)))
98 (substring name
(match-end 0)))))
99 (copy-file (expand-file-name "../etc/DOC")
100 (concat (expand-file-name "../etc/DOC-") name
)
102 (Snarf-documentation (concat "DOC-" name
)))
103 (Snarf-documentation "DOC"))
104 (message "Finding pointers to doc strings...done")
106 ;Note: You can cause additional libraries to be preloaded
107 ;by writing a site-init.el that loads them.
108 ;See also "site-load" above.
112 ;;; At this point, we're ready to resume undo recording for scratch.
113 (buffer-enable-undo "*scratch*")
115 (if (or (equal (nth 3 command-line-args
) "dump")
116 (equal (nth 4 command-line-args
) "dump"))
117 (if (eq system-type
'vax-vms
)
119 (message "Dumping data as file temacs.dump")
120 (dump-emacs "temacs.dump" "temacs")
122 (let ((name (concat "emacs-" emacs-version
)))
123 (while (string-match "[^-+_.a-zA-Z0-9]+" name
)
124 (setq name
(concat (downcase (substring name
0 (match-beginning 0)))
126 (substring name
(match-end 0)))))
127 (message "Dumping under names xemacs and %s" name
))
129 (delete-file "xemacs")
131 (dump-emacs "xemacs" "temacs")
132 ;; Recompute NAME now, so that it isn't set when we dump.
133 (let ((name (concat "emacs-" emacs-version
)))
134 (while (string-match "[^-+_.a-zA-Z0-9]+" name
)
135 (setq name
(concat (downcase (substring name
0 (match-beginning 0)))
137 (substring name
(match-end 0)))))
138 (add-name-to-file "xemacs" name t
))
141 ;; Avoid error if user loads some more libraries now.
142 (setq purify-flag nil
)
144 ;; For machines with CANNOT_DUMP defined in config.h,
145 ;; this file must be loaded each time Emacs is run.
146 ;; So run the startup code now.
148 (or (fboundp 'dump-emacs
)