Mercurial > hg > xemacs-beta
annotate lisp/loadup.el @ 4967:0d4c9d0f6a8d
rewrite dynarr code
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-03 Ben Wing <ben@xemacs.org>
* device-x.c (x_get_resource_prefix):
* device-x.c (Fx_get_resource):
* device-x.c (Fx_get_resource_prefix):
* device-x.c (Fx_put_resource):
* dialog-msw.c:
* dialog-msw.c (handle_question_dialog_box):
* dired-msw.c (mswindows_sort_files):
* dired-msw.c (mswindows_get_files):
* extents.c (extent_fragment_sort_by_priority):
* extents.c (Fset_extent_parent):
* file-coding.c (coding_reader):
* file-coding.c (coding_writer):
* file-coding.c (gzip_convert):
* frame.c (generate_title_string):
* gutter.c (calculate_gutter_size_from_display_lines):
* indent.c (vmotion_1):
* lread.c (read_bit_vector):
* mule-coding.c (iso2022_decode):
* rangetab.c:
* rangetab.c (Fcopy_range_table):
* rangetab.c (Fget_range_table):
* rangetab.c (unified_range_table_copy_data):
* redisplay-msw.c (mswindows_output_string):
* redisplay-output.c (output_display_line):
* redisplay-output.c (redisplay_move_cursor):
* redisplay-output.c (redisplay_clear_bottom_of_window):
* redisplay-tty.c (tty_output_ichar_dynarr):
* redisplay-tty.c (set_foreground_to):
* redisplay-tty.c (set_background_to):
* redisplay-xlike-inc.c (XLIKE_output_string):
* redisplay.c (redisplay_window_text_width_string):
* redisplay.c (redisplay_text_width_string):
* redisplay.c (create_text_block):
* redisplay.c (SET_CURRENT_MODE_CHARS_PIXSIZE):
* redisplay.c (generate_fstring_runes):
* redisplay.c (regenerate_modeline):
* redisplay.c (ensure_modeline_generated):
* redisplay.c (real_current_modeline_height):
* redisplay.c (create_string_text_block):
* redisplay.c (regenerate_window):
* redisplay.c (REGEN_INC_FIND_START_END):
* redisplay.c (point_visible):
* redisplay.c (redisplay_window):
* redisplay.c (mark_glyph_block_dynarr):
* redisplay.c (line_start_cache_start):
* redisplay.c (start_with_line_at_pixpos):
* redisplay.c (update_line_start_cache):
* redisplay.c (glyph_to_pixel_translation):
* redisplay.c (pixel_to_glyph_translation):
* sysdep.c (qxe_readdir):
* text.c (dfc_convert_to_external_format):
* text.c (dfc_convert_to_internal_format):
* toolbar-common.c (common_output_toolbar_button):
* window.c (window_modeline_height):
* window.c (Fwindow_last_line_visible_height):
* window.c (window_displayed_height):
* window.c (window_scroll):
* window.c (get_current_pixel_pos):
Use Dynarr_begin() in place of Dynarr_atp (foo, 0).
* dynarr.c (Dynarr_realloc):
* dynarr.c (Dynarr_lisp_realloc):
* dynarr.c (Dynarr_resize):
* dynarr.c (Dynarr_insert_many):
* dynarr.c (Dynarr_delete_many):
* dynarr.c (Dynarr_memory_usage):
* dynarr.c (stack_like_malloc):
* dynarr.c (stack_like_free):
* lisp.h:
* lisp.h (DECLARE_DYNARR_LISP_IMP):
* lisp.h (XD_DYNARR_DESC):
* lisp.h (Dynarr_pop):
* gutter.c (output_gutter):
* redisplay-output.c (sync_rune_structs):
* redisplay-output.c (redisplay_output_window):
Redo the dynarr code, add greater checks.
Rename the `len', `largest' and `max' members to `len_',
`largest_' and `max_' to try and catch existing places that might
directly modify these values. Make new accessors Dynarr_largest()
and Dynarr_max() and make them and existing Dynarr_length() be
non-lvalues by adding '+ 0' to them; fix a couple of places in the
redisplay code that tried to modify the length directly by setting
Dynarr_length(). Use the accessors whenever possible even in the
dynarr code itself. The accessors also verify that 0 <= len <=
largest <= max. Rename settor function Dynarr_set_size() to
Dynarr_set_length() and use it more consistently; also create
lower-level Dynarr_set_length_1(). This latter function should be
the only function that directly modifies the `len_' member of a
Dynarr, and in the process makes sure that the `largest' value is
kept correct.
Consistently use ERROR_CHECK_STRUCTURES instead of
ERROR_CHECK_TYPES for error-checking code. Reintroduce the
temporarily disabled verification code on the positions of
Dynarr_at(), Dynarr_atp() and Dynarr_atp_past_end().
Also create Dynarr_resize_if() in place of a repeated
code fragment. Clean up all the functions that modify Dynarrs to
use the new macros and functions and verify the correctness of the
Dynarr both before and after the change.
Note that there are two kinds of verification -- one for accessing
and one for modifying. The difference is that the modify
verification additionally checks to make sure that the Dynarr
isn't locked. (This is used in redisplay to check for problems
with reentrancy.)
* lrecord.h: Move XD_DYNARR_DESC to lisp.h, grouping with the dynarr code.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 03 Feb 2010 20:51:18 -0600 |
parents | aa8197436fdb |
children | bedf3747a6d7 |
rev | line source |
---|---|
428 | 1 ;; loadup.el --- load up standardly loaded Lisp files for XEmacs. |
2 | |
3 ;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1996 Richard Mlynarik. | |
4841
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
5 ;; Copyright (C) 1995, 1996, 2003, 2005 Ben Wing. |
428 | 6 |
7 ;; Maintainer: XEmacs Development Team | |
8 ;; Keywords: internal, dumped | |
9 | |
10 ;; This file is part of XEmacs. | |
11 | |
12 ;; XEmacs is free software; you can redistribute it and/or modify it | |
13 ;; under the terms of the GNU General Public License as published by | |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
17 ;; XEmacs is distributed in the hope that it will be useful, but | |
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 ;; General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
25 ;; 02111-1307, USA. | |
26 | |
27 ;;; Synched up with: Last synched with FSF 19.30, with wild divergence since. | |
28 | |
29 ;;; Commentary: | |
30 | |
1261 | 31 ;; If you are wanting to add files to be dumped into your local version of |
32 ;; XEmacs, DO NOT add them here. Use site-init.el or site-load.el instead. | |
428 | 33 |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
34 ;; ***Note the docstrings for the variables in this file. They follow the |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
35 ;; conventions described in lib-src/make-docfile.c, and any new variables or |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
36 ;; functions added to this file should follow those conventions too, since |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
37 ;; this file is always loaded uncompiled, and the byte-compiler never gets a |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
38 ;; chance to format the docstrings in the way make-docfile.c understands. |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
39 |
428 | 40 ;; This is loaded into a bare XEmacs to make a dumpable one. |
41 | |
42 ;;; Code: | |
43 | |
1261 | 44 ;; Help debug problems. |
45 (setq stack-trace-on-error t | |
46 load-always-display-messages t) | |
4841
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
47 (when (featurep 'debug-xemacs) |
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
48 ;; Immediately dump core upon an unhandled error, rather than just quitting |
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
49 ;; the program. This can also be achieved by setting an environment variable |
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
50 ;; XEMACSDEBUG to contain '(setq debug-on-error t)', e.g. |
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
51 ;; export XEMACSDEBUG='(setq debug-on-error t)' |
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
52 (setq debug-on-error t)) |
1261 | 53 |
1330 | 54 ;(princ (format "command-line-args: %s\n" command-line-args)) |
55 ;(princ (format "configure-lisp-directory: %S\n" configure-lisp-directory)) | |
56 ;(princ (format "configure-data-directory: %S\n" configure-data-directory)) | |
57 ;(princ (format "lisp-directory: %S\n" lisp-directory)) | |
58 | |
428 | 59 (when (fboundp 'error) |
60 (error "loadup.el already loaded!")) | |
61 | |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
62 (defconst running-xemacs t "\ |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
63 Non-nil when the current emacs is XEmacs.") |
3511 | 64 |
65 ;; Can't make this constant for now because it causes an error in | |
66 ;; update-elc.el. | |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
67 (defvar source-lisp (file-name-directory (expand-file-name (nth 2 command-line-args))) "\ |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
68 Root of tree containing the Lisp source code for the current build. |
3511 | 69 Differs from `lisp-directory' if this XEmacs has been installed. ") |
70 | |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
71 (defconst build-directory (expand-file-name ".." invocation-directory) "\ |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
72 Root of tree containing object files and executables produced by build. |
3511 | 73 Differs from `source-directory' if configured with --srcdir option, a practice |
74 recommended for developers.") | |
75 | |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
76 (defconst source-directory (expand-file-name ".." source-lisp) "\ |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
77 Root of tree containing source code for the current build. |
3511 | 78 Used during loadup and for documenting source of symbols defined in C.") |
79 | |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
80 (defvar preloaded-file-list nil "\ |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
81 List of Lisp files preloaded into the XEmacs binary image, |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
82 with the exception of `loadup.el'.") |
428 | 83 |
442 | 84 ;(start-profiling) |
85 | |
86 (let ((gc-cons-threshold | |
87 ;; setting it low makes loadup incredibly fucking slow. | |
88 ;; no need to do it when not dumping. | |
89 (if (and purify-flag | |
90 (not (memq 'quick-build internal-error-checking))) | |
91 30000 3000000))) | |
1261 | 92 |
93 ;; really-early-error-handler outputs a stack trace so let's not do it | |
94 ;; twice. | |
95 (let ((stack-trace-on-error nil)) | |
428 | 96 |
97 ;; This is awfully damn early to be getting an error, right? | |
98 (call-with-condition-handler 'really-early-error-handler | |
99 #'(lambda () | |
1330 | 100 (setq load-path (list source-lisp)) |
3511 | 101 (setq module-load-path (list |
102 (expand-file-name "modules" build-directory))) | |
428 | 103 |
104 ;; message not defined yet ... | |
105 (external-debugging-output (format "\nUsing load-path %s" load-path)) | |
106 (external-debugging-output (format "\nUsing module-load-path %s" | |
107 module-load-path)) | |
108 | |
109 ;; We don't want to have any undo records in the dumped XEmacs. | |
110 (buffer-disable-undo (get-buffer "*scratch*")) | |
111 | |
112 ;; lread.c (or src/Makefile.in.in) has prepended | |
113 ;; "${srcdir}/../lisp/" to load-path, which is how this file | |
114 ;; has been found. At this point, enough of XEmacs has been | |
115 ;; initialized that we can start dumping "standard" lisp. | |
116 ;; Dumped lisp from external packages is added when we search | |
117 ;; the package path. | |
118 ;; #### This code is duplicated in two other places. | |
119 (let ((temp-path (expand-file-name "." (car load-path)))) | |
120 (setq load-path (nconc (mapcar | |
121 #'(lambda (i) (concat i "/")) | |
122 (directory-files temp-path t "^[^-.]" | |
123 nil 'dirs-only)) | |
124 (cons (file-name-as-directory temp-path) | |
125 load-path)))) | |
126 | |
1261 | 127 (setq load-warn-when-source-only t) ; Set to nil at the end |
428 | 128 |
129 ;; garbage collect after loading every file in an attempt to | |
130 ;; minimize the size of the dumped image (if we don't do this, | |
131 ;; there will be lots of extra space in the data segment filled | |
132 ;; with garbage-collected junk) | |
133 (defun pureload (file) | |
134 (let ((full-path | |
135 (locate-file file load-path | |
136 (if load-ignore-elc-files | |
137 '(".el" "") '(".elc" ".el" ""))))) | |
138 (if full-path | |
139 (prog1 | |
140 (load full-path) | |
442 | 141 ;; but garbage collection really slows down loading. |
142 (unless (memq 'quick-build internal-error-checking) | |
143 (garbage-collect))) | |
428 | 144 (external-debugging-output (format "\nLoad file %s: not found\n" |
145 file)) | |
146 ;; Uncomment in case of trouble | |
2456 | 147 ;;(print (format "late-package-hierarchies: %S" late-package-hierarchies)) |
1227 | 148 ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-root-p))) |
149 ;;(print (format "guessed-data-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-data-root-p))) | |
428 | 150 nil))) |
151 | |
1330 | 152 (load (expand-file-name "dumped-lisp.el" source-lisp)) |
428 | 153 |
154 (let ((files preloaded-file-list) | |
155 file) | |
156 (while (setq file (car files)) | |
157 (unless (pureload file) | |
158 (external-debugging-output "Fatal error during load, aborting") | |
159 (kill-emacs 1)) | |
160 (setq files (cdr files))) | |
161 (when (not (featurep 'toolbar)) | |
162 ;; else still define a few functions. | |
163 (defun toolbar-button-p (obj) "No toolbar support." nil) | |
164 (defun toolbar-specifier-p (obj) "No toolbar support." nil)) | |
165 (fmakunbound 'pureload)) | |
166 | |
167 (packages-load-package-dumped-lisps late-package-load-path) | |
168 | |
169 )) ;; end of call-with-condition-handler | |
1261 | 170 |
171 ) ; (let ((stack-trace-on-error nil))) | |
428 | 172 |
173 ;; Fix up the preloaded file list | |
174 (setq preloaded-file-list (mapcar #'file-name-sans-extension | |
175 preloaded-file-list)) | |
176 | |
1261 | 177 (setq load-warn-when-source-only nil) |
428 | 178 |
179 (setq debugger 'debug) | |
180 | |
181 (when (member "no-site-file" command-line-args) | |
182 (setq site-start-file nil)) | |
183 | |
184 ;; If you want additional libraries to be preloaded and their | |
185 ;; doc strings kept in the DOC file rather than in core, | |
186 ;; you may load them with a "site-load.el" file. | |
187 ;; But you must also cause them to be scanned when the DOC file | |
1261 | 188 ;; is generated. For MS Windows, you must edit ../nt/xemacs.mak. |
189 ;; For other systems, you must edit ../src/Makefile.in.in. | |
428 | 190 (when (load "site-load" t) |
442 | 191 (garbage-collect) |
192 ) | |
428 | 193 |
194 ;;FSFmacs randomness | |
195 ;;(if (fboundp 'x-popup-menu) | |
196 ;; (precompute-menubar-bindings)) | |
197 ;;; Turn on recording of which commands get rebound, | |
198 ;;; for the sake of the next call to precompute-menubar-bindings. | |
199 ;(setq define-key-rebound-commands nil) | |
200 | |
201 ;; Note: all compiled Lisp files loaded above this point | |
202 ;; must be among the ones parsed by make-docfile | |
203 ;; to construct DOC. Any that are not processed | |
204 ;; for DOC will not have doc strings in the dumped XEmacs. | |
205 | |
206 ;; Don't bother with these if we're running temacs, i.e. if we're | |
207 ;; just debugging don't waste time finding doc strings. | |
208 | |
209 ;; purify-flag is nil if called from loadup-el.el. | |
210 (when purify-flag | |
211 (message "Finding pointers to doc strings...") | |
212 (Snarf-documentation "DOC") | |
213 (message "Finding pointers to doc strings...done") | |
214 (Verify-documentation)) | |
215 | |
216 ;; Note: You can cause additional libraries to be preloaded | |
217 ;; by writing a site-init.el that loads them. | |
218 ;; See also "site-load" above. | |
219 (when (stringp site-start-file) | |
220 (load "site-init" t)) | |
4539
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
221 ;; Add information from this file to the load history: |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
222 (setq load-history (cons (nreverse current-load-list) load-history) |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
223 ;; Clear current-load-list; this (and adding information to |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
224 ;; load-history) is normally done in lread.c after reading the |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
225 ;; entirety of a file, something which never happens for loadup.el. |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
226 current-load-list nil) |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
227 ;; Make the path to this file look a little nicer: |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
228 (setcar (car load-history) (file-truename (caar load-history))) |
061e030e3270
Fix some bugs in load-history construction, built-in symbol file names.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4246
diff
changeset
|
229 |
4899
aa8197436fdb
Make #'find-function behave better with dumped functions, installed XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents:
4841
diff
changeset
|
230 ;; Make #'find-function behave better with dumped files. |
aa8197436fdb
Make #'find-function behave better with dumped functions, installed XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents:
4841
diff
changeset
|
231 (let ((source-lisp (concat "^" (regexp-quote source-lisp)))) |
aa8197436fdb
Make #'find-function behave better with dumped functions, installed XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents:
4841
diff
changeset
|
232 (mapc |
aa8197436fdb
Make #'find-function behave better with dumped functions, installed XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents:
4841
diff
changeset
|
233 #'(lambda (elt) (setcar elt (replace-in-string (car elt) source-lisp ""))) |
aa8197436fdb
Make #'find-function behave better with dumped functions, installed XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents:
4841
diff
changeset
|
234 load-history)) |
aa8197436fdb
Make #'find-function behave better with dumped functions, installed XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents:
4841
diff
changeset
|
235 |
428 | 236 (garbage-collect) |
237 | |
238 ;;; At this point, we're ready to resume undo recording for scratch. | |
239 (buffer-enable-undo "*scratch*") | |
240 | |
1261 | 241 ) ;; (let ((gc-cons-threshold [frequent garbage collection when dumping]))) |
428 | 242 |
442 | 243 ;(stop-profiling) |
244 | |
428 | 245 ;; Dump into the name `xemacs' (only) |
246 (when (member "dump" command-line-args) | |
247 (message "Dumping under the name xemacs") | |
248 ;; This is handled earlier in the build process. | |
249 ;; (condition-case () (delete-file "xemacs") (file-error nil)) | |
250 (when (fboundp 'really-free) | |
251 (really-free)) | |
1261 | 252 ;; Make sure we don't dump with debugging messages turned on. |
253 (setq stack-trace-on-error nil | |
4841
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
254 load-always-display-messages nil |
3465c3161fea
when `debug', abort when lisp error during loadup
Ben Wing <ben@xemacs.org>
parents:
4539
diff
changeset
|
255 debug-on-error nil) |
462 | 256 (dump-emacs |
257 (cond | |
258 ((featurep 'infodock) "infodock") | |
259 ;; #### BILL!!! | |
260 ;; If we want to dump under a name other than `xemacs', do that here! | |
261 ;; ((featurep 'gtk) "xemacs-gtk") | |
262 (t "xemacs")) | |
263 "temacs") | |
428 | 264 (kill-emacs)) |
265 | |
266 ;; Avoid error if user loads some more libraries now. | |
267 (setq purify-flag nil) | |
268 | |
269 (when (member "run-temacs" command-line-args) | |
270 (message "\nBootstrapping from temacs...") | |
271 ;; Remove all args up to and including "run-temacs" | |
272 (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args))) | |
273 ;; run-emacs-from-temacs doesn't actually return anyway. | |
274 (kill-emacs)) | |
275 | |
276 ;; XEmacs change | |
277 ;; If you are using 'recompile', then you should have used -l loadup-el.el | |
278 ;; so that the .el files always get loaded (the .elc files may be out-of- | |
279 ;; date or bad). | |
280 (when (member "recompile" command-line-args) | |
281 (setq command-line-args-left (cdr (member "recompile" command-line-args))) | |
282 (batch-byte-recompile-directory) | |
283 (kill-emacs)) | |
284 | |
285 ;; For machines with CANNOT_DUMP defined in config.h, | |
286 ;; this file must be loaded each time Emacs is run. | |
287 ;; So run the startup code now. | |
288 | |
289 (when (not (fboundp 'dump-emacs)) | |
290 ;; Avoid loading loadup.el a second time! | |
291 (setq command-line-args (cdr (cdr command-line-args))) | |
292 (eval top-level)) | |
293 | |
294 ;;; loadup.el ends here |