annotate lisp/loadup.el @ 209:41ff10fd062f r20-4b3

Import from CVS: tag r20-4b3
author cvs
date Mon, 13 Aug 2007 10:04:58 +0200
parents
children 1f0dabaa0855
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
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
3 ;; Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc.
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
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
7 ;; Keywords: internal
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
8
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
10
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
14 ;; any later version.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
15
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
19 ;; General Public License for more details.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
20
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
25
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
26 ;;; Synched up with: Last synched with FSF 19.30, with wild divergence since.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
27
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
28 ;;; Commentary:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
29
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
30 ;; It is not a good idea to edit this file. Use site-init.el or site-load.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
31 ;; instead.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
32 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
33 ;; This is loaded into a bare Emacs to make a dumpable one.
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
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
37 (if (fboundp 'error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
38 (error "loadup.el already loaded!"))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
39
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
40 (define-function 'defalias 'define-function)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
41 (defvar running-xemacs t
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
42 "Non-nil when the current emacsen is XEmacs.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
43 (defvar preloaded-file-list nil
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
44 "List of files preloaded into the XEmacs binary image.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
45
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
46 (call-with-condition-handler
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
47 ;; This is awfully damn early to be getting an error, right?
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
48 'really-early-error-handler
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
49 #'(lambda ()
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
50 ;; message not defined yet ...
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
51 (external-debugging-output (format "\nUsing load-path %s" load-path))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
52
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
53 ;; We don't want to have any undo records in the dumped XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
54 (buffer-disable-undo (get-buffer "*scratch*"))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
55
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
56 ;; lread.c (or src/Makefile.in.in) has prepended "${srcdir}/../lisp/"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
57 ;; to load-path, which is how this file has been found. At this point,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
58 ;; enough of emacs has been initialized that we can call directory-files
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
59 ;; and get the rest of the dirs (so that we can dump stuff from modes/
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
60 ;; and packages/.)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
61 ;;
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
62 (let ((temp-path (expand-file-name "." (car load-path))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
63 (setq source-directory temp-path)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
64 (setq load-path (nconc (mapcar
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
65 #'(lambda (i) (concat i "/"))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
66 (directory-files temp-path t "^[^-.]"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
67 nil 'dirs-only))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
68 (cons (file-name-as-directory temp-path)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
69 load-path))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
70
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
71 (setq load-warn-when-source-newer t ; set to nil at the end
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
72 load-warn-when-source-only t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
73
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
74 ;; Inserted for debugging. Something is corrupting a single symbol
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
75 ;; somewhere to have an integer 0 property list. -slb 6/28/1997.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
76 (defun test-atoms ()
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
77 (mapatoms
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
78 #'(lambda (symbol)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
79 (condition-case nil
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
80 (get symbol 'custom-group)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
81 (t (princ
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
82 (format "Bad plist in %s, %s\n"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
83 (symbol-name symbol)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
84 (prin1-to-string (object-plist symbol)))))))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
85
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
86 ;; garbage collect after loading every file in an attempt to
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
87 ;; minimize the size of the dumped image (if we don't do this,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
88 ;; there will be lots of extra space in the data segment filled
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
89 ;; with garbage-collected junk)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
90 (defmacro load-gc (file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
91 (list 'prog1 (list 'load file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
92 ;; '(test-atoms)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
93 '(garbage-collect)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
94 ;; Need a minimal number hardcoded to get going for now.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
95 ;; (load-gc "backquote") ; needed for defsubst etc.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
96 ;; (load-gc "bytecomp-runtime") ; define defsubst
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
97 ;; (load-gc "subr") ; load the most basic Lisp functions
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
98 ;; (load-gc "replace") ; match-string used in version.el.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
99 ;; (load-gc "version.el") ; Ignore compiled-by-mistake version.elc
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
100 ;; (load-gc "cl")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
101 ;; (load-gc "featurep") ; OBSOLETE now
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
102 (load "dumped-lisp.el")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
103 (let ((dumped-lisp-packages preloaded-file-list)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
104 file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
105 (while (setq file (car dumped-lisp-packages))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
106 (load-gc file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
107 (setq dumped-lisp-packages (cdr dumped-lisp-packages)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
108 (if (not (featurep 'toolbar))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
109 (progn
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
110 ;; else still define a few functions.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
111 (defun toolbar-button-p (obj) "No toolbar support." nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
112 (defun toolbar-specifier-p (obj) "No toolbar support." nil)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
113 (fmakunbound 'load-gc))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
114 )) ;; end of call-with-condition-handler
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
115
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
116
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
117 ;; Fix up the preloaded file list
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
118 (setq preloaded-file-list (mapcar #'file-name-sans-extension
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
119 preloaded-file-list))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
120
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
121 (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
122 load-warn-when-source-only nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
123
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
124 (setq debugger 'debug)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
125
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
126 (when (member "no-site-file" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
127 (setq site-start-file nil))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
128
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
129 ;; If you want additional libraries to be preloaded and their
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
130 ;; doc strings kept in the DOC file rather than in core,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
131 ;; you may load them with a "site-load.el" file.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
132 ;; But you must also cause them to be scanned when the DOC file
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
133 ;; is generated. For VMS, you must edit ../../vms/makedoc.com.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
134 ;; For other systems, you must edit ../../src/Makefile.in.in.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
135 (if (load "site-load" t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
136 (garbage-collect))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
137
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
138 ;;FSFmacs randomness
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
139 ;;(if (fboundp 'x-popup-menu)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
140 ;; (precompute-menubar-bindings))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
141 ;;; Turn on recording of which commands get rebound,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
142 ;;; for the sake of the next call to precompute-menubar-bindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
143 ;(setq define-key-rebound-commands nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
144
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
145
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
146 ;; Note: all compiled Lisp files loaded above this point
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
147 ;; must be among the ones parsed by make-docfile
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
148 ;; to construct DOC. Any that are not processed
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
149 ;; for DOC will not have doc strings in the dumped XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
150
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
151 ;; 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
152 ;; just debugging don't waste time finding doc strings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
153
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
154 ;; purify-flag is nil if called from loadup-el.el.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
155 (when purify-flag
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
156 (message "Finding pointers to doc strings...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
157 ;; (test-atoms) ; Debug -- Doesn't happen here
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
158 (Snarf-documentation "DOC")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
159 ;; (test-atoms) ; Debug -- Doesn't happen here
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
160 (message "Finding pointers to doc strings...done")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
161 (Verify-documentation)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
162 ;; (test-atoms) ; Debug -- Doesn't happen here
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
163 )
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
164
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
165 ;; Note: You can cause additional libraries to be preloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
166 ;; by writing a site-init.el that loads them.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
167 ;; See also "site-load" above.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
168 (if (stringp site-start-file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
169 (load "site-init" t))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
170 (setq current-load-list nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
171 (garbage-collect)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
172
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
173 ;;; At this point, we're ready to resume undo recording for scratch.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
174 (buffer-enable-undo "*scratch*")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
175
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
176 ;; Dump into the name `xemacs' (only)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
177 (when (member "dump" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
178 (message "Dumping under the name xemacs")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
179 (condition-case () (delete-file "xemacs") (file-error nil))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
180 (when (fboundp 'really-free)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
181 (really-free))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
182 (dump-emacs "xemacs" "temacs")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
183 (kill-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
184
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
185 (when (member "run-temacs" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
186 (message "\nBootstrapping from temacs...")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
187 (setq purify-flag nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
188 ;; Remove all args up to and including "run-temacs"
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
189 (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
190 ;; run-emacs-from-temacs doesn't actually return anyway.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
191 (kill-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
192
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
193 ;; Avoid error if user loads some more libraries now.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
194 (setq purify-flag nil)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
195
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
196 ;; XEmacs change
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
197 ;; 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
198 ;; 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
199 ;; date or bad).
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
200 (when (member "recompile" command-line-args)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
201 (let ((command-line-args-left (cdr (member "recompile" command-line-args))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
202 (batch-byte-recompile-directory)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
203 (kill-emacs)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
204
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
205 ;; For machines with CANNOT_DUMP defined in config.h,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
206 ;; this file must be loaded each time Emacs is run.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
207 ;; So run the startup code now.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
208
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
209 (when (not (fboundp 'dump-emacs))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
210 ;; Avoid loading loadup.el a second time!
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
211 (setq command-line-args (cdr (cdr command-line-args)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
212 (eval top-level))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
213
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
214 ;;; loadup.el ends here