annotate lisp/loadup.el @ 235:85a06df23a9a r20-5b16

Import from CVS: tag r20-5b16
author cvs
date Mon, 13 Aug 2007 10:14:40 +0200
parents 0e522484dd2a
children f220cc83d72e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
1 ;;; loadup.el --- load up standardly loaded Lisp files for XEmacs.
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
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
31 ;; Please do not edit this file. Use site-init.el, site-load.el, or
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
32 ;; packaged dumped-lisp.el's instead.
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
33
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 215
diff changeset
34 ;; This is loaded into a bare XEmacs to make a dumpable one.
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
35
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
36 ;;; Code:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
37
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
38 (if (fboundp 'error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
39 (error "loadup.el already loaded!"))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
40
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
41 (define-function 'defalias 'define-function)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
42 (defvar running-xemacs t
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
43 "Non-nil when the current emacsen is XEmacs.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
44 (defvar preloaded-file-list nil
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
45 "List of files preloaded into the XEmacs binary image.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
46
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
47 ;; This is awfully damn early to be getting an error, right?
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
48 (call-with-condition-handler 'really-early-error-handler
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
49 #'(lambda ()
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
50 ;; message not defined yet ...
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
51 (external-debugging-output (format "\nUsing load-path %s" load-path))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
52
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
53 ;; 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
54 (buffer-disable-undo (get-buffer "*scratch*"))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
55
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
56 ;; lread.c (or src/Makefile.in.in) has prepended
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
57 ;; "${srcdir}/../lisp/" to load-path, which is how this file
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
58 ;; has been found. At this point, enough of XEmacs has been
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
59 ;; initialized that we can start dumping "standard" lisp.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
60 ;; Dumped lisp from external packages is added when we search
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
61 ;; the `package-path'.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
62 ;; #### This code is duplicated in two other places.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
63 (let ((temp-path (expand-file-name "." (car load-path))))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
64 (setq source-directory temp-path)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
65 (setq load-path (nconc (mapcar
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
66 #'(lambda (i) (concat i "/"))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
67 (directory-files temp-path t "^[^-.]"
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
68 nil 'dirs-only))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
69 (cons (file-name-as-directory temp-path)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
70 load-path))))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
71
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
72 (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
73 load-warn-when-source-only t) ; Set to nil at the end
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
74
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
75 ;; Inserted for debugging. Something is corrupting a single symbol
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
76 ;; somewhere to have an integer 0 property list. -slb 6/28/1997.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
77 (defun test-atoms ()
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
78 (mapatoms
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
79 #'(lambda (symbol)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
80 (condition-case nil
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
81 (get symbol 'custom-group)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
82 (t (princ
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
83 (format "Bad plist in %s, %s\n"
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
84 (symbol-name symbol)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
85 (prin1-to-string (object-plist symbol)))))))))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
86
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
87 ;; garbage collect after loading every file in an attempt to
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
88 ;; 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
89 ;; there will be lots of extra space in the data segment filled
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
90 ;; with garbage-collected junk)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
91 (defmacro load-gc (file)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
92 (list 'prog1
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
93 (list 'load
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
94 (list 'locate-file file
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
95 'load-path
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
96 (list 'if 'load-ignore-elc-files
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
97 ".el:"
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
98 ".elc:.el:")))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
99 ;; '(test-atoms)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
100 '(garbage-collect)))
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
101
227
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
102 (load (concat default-directory "../lisp/dumped-lisp.el"))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
103 (let ((dumped-lisp-packages preloaded-file-list)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
104 file)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
105 (while (setq file (car dumped-lisp-packages))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
106 (load-gc file)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
107 (setq dumped-lisp-packages (cdr dumped-lisp-packages)))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
108 (if (not (featurep 'toolbar))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
109 (progn
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
110 ;; else still define a few functions.
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
111 (defun toolbar-button-p (obj) "No toolbar support." nil)
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
112 (defun toolbar-specifier-p (obj) "No toolbar support." nil)))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
113 (fmakunbound 'load-gc))
0e522484dd2a Import from CVS: tag r20-5b12
cvs
parents: 223
diff changeset
114 )) ;; end of call-with-condition-handler
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
115
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
116 ;; Fix up the preloaded file list
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
117 (setq preloaded-file-list (mapcar #'file-name-sans-extension
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
118 preloaded-file-list))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
119
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
120 (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
121 load-warn-when-source-only nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
122
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
123 (setq debugger 'debug)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
124
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
125 (when (member "no-site-file" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
126 (setq site-start-file nil))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
127
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
128 ;; If you want additional libraries to be preloaded and their
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
129 ;; doc strings kept in the DOC file rather than in core,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
130 ;; you may load them with a "site-load.el" file.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
131 ;; But you must also cause them to be scanned when the DOC file
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
132 ;; is generated. For VMS, you must edit ../../vms/makedoc.com.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
133 ;; For other systems, you must edit ../../src/Makefile.in.in.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
134 (if (load "site-load" t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
135 (garbage-collect))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
136
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
137 ;;FSFmacs randomness
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
138 ;;(if (fboundp 'x-popup-menu)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
139 ;; (precompute-menubar-bindings))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
140 ;;; Turn on recording of which commands get rebound,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
141 ;;; for the sake of the next call to precompute-menubar-bindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
142 ;(setq define-key-rebound-commands nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
143
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
144
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
145 ;; Note: all compiled Lisp files loaded above this point
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
146 ;; must be among the ones parsed by make-docfile
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
147 ;; to construct DOC. Any that are not processed
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
148 ;; for DOC will not have doc strings in the dumped XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
149
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
150 ;; 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
151 ;; just debugging don't waste time finding doc strings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
152
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
153 ;; purify-flag is nil if called from loadup-el.el.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
154 (when purify-flag
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
155 (message "Finding pointers to doc strings...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
156 ;; (test-atoms) ; Debug -- Doesn't happen here
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
157 (Snarf-documentation "DOC")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
158 ;; (test-atoms) ; Debug -- Doesn't happen here
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
159 (message "Finding pointers to doc strings...done")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
160 (Verify-documentation)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
161 ;; (test-atoms) ; Debug -- Doesn't happen here
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
162 )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
163
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
164 ;; Note: You can cause additional libraries to be preloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
165 ;; by writing a site-init.el that loads them.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
166 ;; See also "site-load" above.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
167 (if (stringp site-start-file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
168 (load "site-init" t))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
169 (setq current-load-list nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
170 (garbage-collect)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
171
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
172 ;;; At this point, we're ready to resume undo recording for scratch.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
173 (buffer-enable-undo "*scratch*")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
174
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
175 ;; Dump into the name `xemacs' (only)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
176 (when (member "dump" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
177 (message "Dumping under the name xemacs")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
178 (condition-case () (delete-file "xemacs") (file-error nil))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
179 (when (fboundp 'really-free)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
180 (really-free))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
181 (dump-emacs "xemacs" "temacs")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
182 (kill-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
183
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
184 (when (member "run-temacs" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
185 (message "\nBootstrapping from temacs...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
186 (setq purify-flag nil)
215
1f0dabaa0855 Import from CVS: tag r20-4b6
cvs
parents: 209
diff changeset
187 (setq inhibit-package-init t)
235
85a06df23a9a Import from CVS: tag r20-5b16
cvs
parents: 227
diff changeset
188 (setq inhibit-update-dumped-lisp t)
85a06df23a9a Import from CVS: tag r20-5b16
cvs
parents: 227
diff changeset
189 (setq inhibit-update-autoloads t)
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
190 ;; Remove all args up to and including "run-temacs"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
191 (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
192 ;; run-emacs-from-temacs doesn't actually return anyway.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
193 (kill-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
194
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
195 ;; Avoid error if user loads some more libraries now.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
196 (setq purify-flag nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
197
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
198 ;; XEmacs change
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
199 ;; 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
200 ;; 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
201 ;; date or bad).
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
202 (when (member "recompile" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
203 (let ((command-line-args-left (cdr (member "recompile" command-line-args))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
204 (batch-byte-recompile-directory)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
205 (kill-emacs)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
206
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
207 ;; For machines with CANNOT_DUMP defined in config.h,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
208 ;; this file must be loaded each time Emacs is run.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
209 ;; So run the startup code now.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
210
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
211 (when (not (fboundp 'dump-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
212 ;; Avoid loading loadup.el a second time!
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
213 (setq command-line-args (cdr (cdr command-line-args)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
214 (eval top-level))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
215
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
216 ;;; loadup.el ends here