annotate lisp/loadup.el @ 402:5a2589c672dc r21-2-31

Import from CVS: tag r21-2-31
author cvs
date Mon, 13 Aug 2007 11:14:58 +0200
parents 74fd4e045ea6
children b8cc9ab3f761
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
1 ;; loadup.el --- load up standardly loaded Lisp files for XEmacs.
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
2
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
3 ;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc.
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
4 ;; Copyright (C) 1996 Richard Mlynarik.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995, 1996 Ben Wing.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
6
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
7 ;; Maintainer: XEmacs Development Team
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
8 ;; Keywords: internal, dumped
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
9
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
11
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
13 ;; under the terms of the GNU General Public License as published by
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
15 ;; any later version.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
16
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
20 ;; General Public License for more details.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
21
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
25 ;; 02111-1307, USA.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
26
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
27 ;;; Synched up with: Last synched with FSF 19.30, with wild divergence since.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
28
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
29 ;;; Commentary:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
30
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
31 ;; Please do not edit this file. Use site-init.el or site-load.el instead.
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
32
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
33 ;; This is loaded into a bare XEmacs to make a dumpable one.
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
34
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
35 ;;; Code:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
36
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
37 (when (fboundp 'error)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
38 (error "loadup.el already loaded!"))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
39
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
40 (defvar running-xemacs t
247
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 243
diff changeset
41 "Non-nil when the current emacs is XEmacs.")
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
42 (defvar preloaded-file-list nil
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
43 "List of files preloaded into the XEmacs binary image.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
44
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
45 (defvar Installation-string nil
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
46 "Description of XEmacs installation.")
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
47
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
48 (let ((gc-cons-threshold 30000))
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
49
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
50 ;; This is awfully damn early to be getting an error, right?
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
51 (call-with-condition-handler 'really-early-error-handler
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
52 #'(lambda ()
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
53
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
54 ;; Initialize Installation-string. We do it before loading
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
55 ;; anything so that dumped code can make use of its value.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
56 (setq Installation-string
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
57 (save-current-buffer
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
58 (set-buffer (get-buffer-create (generate-new-buffer-name
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
59 " *temp*")))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
60 ;; insert-file-contents-internal bogusly calls
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
61 ;; format-decode without checking if it's defined.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
62 (fset 'format-decode #'(lambda (f l &optional v) l))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
63 (insert-file-contents-internal "../Installation")
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
64 (fmakunbound 'format-decode)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
65 (prog1 (buffer-substring)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
66 (kill-buffer (current-buffer)))))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
67
402
5a2589c672dc Import from CVS: tag r21-2-31
cvs
parents: 398
diff changeset
68 (let ((build-root (expand-file-name ".." invocation-directory)))
5a2589c672dc Import from CVS: tag r21-2-31
cvs
parents: 398
diff changeset
69 (setq load-path (list (expand-file-name "lisp" build-root)))
5a2589c672dc Import from CVS: tag r21-2-31
cvs
parents: 398
diff changeset
70 (setq module-load-path (list (expand-file-name "modules" build-root))))
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
71
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
72 ;; message not defined yet ...
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
73 (external-debugging-output (format "\nUsing load-path %s" load-path))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
74 (external-debugging-output (format "\nUsing module-load-path %s"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
75 module-load-path))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
76
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
77 ;; We don't want to have any undo records in the dumped XEmacs.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
78 (buffer-disable-undo (get-buffer "*scratch*"))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
79
304
c6de09ad3017 Import from CVS: tag r21-0b50
cvs
parents: 284
diff changeset
80 ;; Load our first bootstrap support
c6de09ad3017 Import from CVS: tag r21-0b50
cvs
parents: 284
diff changeset
81 (load "very-early-lisp" nil t)
c6de09ad3017 Import from CVS: tag r21-0b50
cvs
parents: 284
diff changeset
82
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
83 ;; lread.c (or src/Makefile.in.in) has prepended
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
84 ;; "${srcdir}/../lisp/" to load-path, which is how this file
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
85 ;; has been found. At this point, enough of XEmacs has been
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
86 ;; initialized that we can start dumping "standard" lisp.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
87 ;; Dumped lisp from external packages is added when we search
274
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
88 ;; the package path.
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
89 ;; #### This code is duplicated in two other places.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
90 (let ((temp-path (expand-file-name "." (car load-path))))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
91 (setq load-path (nconc (mapcar
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
92 #'(lambda (i) (concat i "/"))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
93 (directory-files temp-path t "^[^-.]"
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
94 nil 'dirs-only))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
95 (cons (file-name-as-directory temp-path)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
96 load-path))))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
97
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
98 (setq load-warn-when-source-newer t ; Used to be set to nil at the end
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
99 load-warn-when-source-only t) ; Set to nil at the end
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
100
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
101 ;; garbage collect after loading every file in an attempt to
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
102 ;; minimize the size of the dumped image (if we don't do this,
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
103 ;; there will be lots of extra space in the data segment filled
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
104 ;; with garbage-collected junk)
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
105 (defun pureload (file)
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
106 (let ((full-path
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
107 (locate-file file load-path
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
108 (if load-ignore-elc-files
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
109 '(".el" "") '(".elc" ".el" "")))))
243
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 235
diff changeset
110 (if full-path
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 235
diff changeset
111 (prog1
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 235
diff changeset
112 (load full-path)
274
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
113 (garbage-collect))
243
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 235
diff changeset
114 (external-debugging-output (format "\nLoad file %s: not found\n"
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 235
diff changeset
115 file))
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
116 ;; Uncomment in case of trouble
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
117 ;;(print (format "late-packages: %S" late-packages))
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 267
diff changeset
118 ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name)))
243
f220cc83d72e Import from CVS: tag r20-5b20
cvs
parents: 235
diff changeset
119 nil)))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
120
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
121 (load (expand-file-name "../lisp/dumped-lisp.el"))
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
122
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
123 (let ((files preloaded-file-list)
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
124 file)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
125 (while (setq file (car files))
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
126 (unless (pureload file)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
127 (external-debugging-output "Fatal error during load, aborting")
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
128 (kill-emacs 1))
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
129 (setq files (cdr files)))
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
130 (when (not (featurep 'toolbar))
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
131 ;; else still define a few functions.
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
132 (defun toolbar-button-p (obj) "No toolbar support." nil)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
133 (defun toolbar-specifier-p (obj) "No toolbar support." nil))
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
134 (fmakunbound 'pureload))
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
135
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
136 (packages-load-package-dumped-lisps late-package-load-path)
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
137
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
138 )) ;; end of call-with-condition-handler
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
139
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
140 ;; Fix up the preloaded file list
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
141 (setq preloaded-file-list (mapcar #'file-name-sans-extension
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
142 preloaded-file-list))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
143
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
144 (setq load-warn-when-source-newer t ; set to t at top of file
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
145 load-warn-when-source-only nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
146
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
147 (setq debugger 'debug)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
148
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
149 (when (member "no-site-file" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
150 (setq site-start-file nil))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
151
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
152 ;; If you want additional libraries to be preloaded and their
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
153 ;; doc strings kept in the DOC file rather than in core,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
154 ;; you may load them with a "site-load.el" file.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
155 ;; But you must also cause them to be scanned when the DOC file
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
156 ;; is generated. For VMS, you must edit ../../vms/makedoc.com.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
157 ;; For other systems, you must edit ../../src/Makefile.in.in.
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
158 (when (load "site-load" t)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
159 (garbage-collect))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
160
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
161 ;;FSFmacs randomness
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
162 ;;(if (fboundp 'x-popup-menu)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
163 ;; (precompute-menubar-bindings))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
164 ;;; Turn on recording of which commands get rebound,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
165 ;;; for the sake of the next call to precompute-menubar-bindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
166 ;(setq define-key-rebound-commands nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
167
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
168 ;; Note: all compiled Lisp files loaded above this point
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
169 ;; must be among the ones parsed by make-docfile
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
170 ;; to construct DOC. Any that are not processed
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
171 ;; for DOC will not have doc strings in the dumped XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
172
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
173 ;; Don't bother with these if we're running temacs, i.e. if we're
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
174 ;; just debugging don't waste time finding doc strings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
175
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
176 ;; purify-flag is nil if called from loadup-el.el.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
177 (when purify-flag
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
178 (message "Finding pointers to doc strings...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
179 (Snarf-documentation "DOC")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
180 (message "Finding pointers to doc strings...done")
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
181 (Verify-documentation))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
182
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
183 ;; Note: You can cause additional libraries to be preloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
184 ;; by writing a site-init.el that loads them.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
185 ;; See also "site-load" above.
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
186 (when (stringp site-start-file)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
187 (load "site-init" t))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
188 (setq current-load-list nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
189 (garbage-collect)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
190
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
191 ;;; At this point, we're ready to resume undo recording for scratch.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
192 (buffer-enable-undo "*scratch*")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
193
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
194 ) ;; frequent garbage collection
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
195
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
196 ;; Dump into the name `xemacs' (only)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
197 (when (member "dump" command-line-args)
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
198 (message "Dumping under the name xemacs")
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
199 ;; This is handled earlier in the build process.
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
200 ;; (condition-case () (delete-file "xemacs") (file-error nil))
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
201 (when (fboundp 'really-free)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
202 (really-free))
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
203 (dump-emacs (if (featurep 'infodock) "infodock" "xemacs") "temacs")
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
204 (kill-emacs))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
205
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
206 ;; Avoid error if user loads some more libraries now.
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
207 (setq purify-flag nil)
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
208
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
209 (when (member "run-temacs" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
210 (message "\nBootstrapping from temacs...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
211 ;; Remove all args up to and including "run-temacs"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
212 (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
213 ;; run-emacs-from-temacs doesn't actually return anyway.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
214 (kill-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
215
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
216 ;; XEmacs change
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
217 ;; If you are using 'recompile', then you should have used -l loadup-el.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
218 ;; so that the .el files always get loaded (the .elc files may be out-of-
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
219 ;; date or bad).
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
220 (when (member "recompile" command-line-args)
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
221 (setq command-line-args-left (cdr (member "recompile" command-line-args)))
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
222 (batch-byte-recompile-directory)
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 373
diff changeset
223 (kill-emacs))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
224
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
225 ;; For machines with CANNOT_DUMP defined in config.h,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
226 ;; this file must be loaded each time Emacs is run.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
227 ;; So run the startup code now.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
228
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
229 (when (not (fboundp 'dump-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
230 ;; Avoid loading loadup.el a second time!
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
231 (setq command-line-args (cdr (cdr command-line-args)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
232 (eval top-level))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
233
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
234 ;;; loadup.el ends here