annotate lisp/loadup.el @ 1315:70921960b980

[xemacs-hg @ 2003-02-20 08:19:28 by ben] check in makefile fixes et al Makefile.in.in: Major surgery. Move all stuff related to building anything in the src/ directory into src/. Simplify the dependencies -- everything in src/ is dependent on the single entry `src' in MAKE_SUBDIRS. Remove weirdo targets like `all-elc[s]', dump-elc[s], etc. mule/mule-msw-init.el: Removed. Delete this file. mule/mule-win32-init.el: New file, with stuff from mule-msw-init.el -- not just for MS Windows native, boys and girls! bytecomp.el: Change code inserted to catch trying to load a Mule-only .elc file in a non-Mule XEmacs. Formerly you got the rather cryptic "The required feature `mule' cannot be provided". Now you get "Loading this file requires Mule support". finder.el: Remove dependency on which directory this function is invoked from. update-elc.el: Don't mess around with ../src/BYTECOMPILE_CHANGE. Now that Makefile.in.in and xemacs.mak are in sync, both of them use NEEDTODUMP and the other one isn't used. dumped-lisp.el: Rewrite in terms of `list' and `nconc' instead of assemble-list, so we can have arbitrary forms, not just `when-feature'. very-early-lisp.el: Nuke this file. finder-inf.el, packages.el, update-elc.el, update-elc-2.el, loadup.el, make-docfile.el: Eliminate references to very-early-lisp. msw-glyphs.el: Comment clarification. xemacs.mak: Add macros DO_TEMACS, DO_XEMACS, and a few others; this macro section is now completely in sync with src/Makefile.in.in. Copy check-features, load-shadows, and rebuilding finder-inf.el from src/Makefile.in.in. The main build/dump/recompile process is now synchronized with src/Makefile.in.in. Change `WARNING' to `NOTE' and `error checking' to `error-checking' TO avoid tripping faux warnings and errors in the VC++ IDE. Makefile.in.in: Major surgery. Move all stuff related to building anything in the src/ directory from top-level Makefile.in.in to here. Simplify the dependencies. Rearrange into logical subsections. Synchronize the main compile/dump/build-elcs section with xemacs.mak, which is already clean and in good working order. Remove weirdo targets like `all-elc[s]', dump-elc[s], etc. Add additional levels of macros \(e.g. DO_TEMACS, DO_XEMACS, TEMACS_BATCH, XEMACS_BATCH, XEMACS_BATCH_PACKAGES) to factor out duplicated stuff. Clean up handling of "HEAP_IN_DATA" (Cygwin) so it doesn't need to ignore the return value from dumping. Add .NO_PARALLEL since various aspects of building and dumping must be serialized but do not always have dependencies between them (this is impossible in some cases). Everything related to src/ now gets built in one pass in this directory by just running `make' (except the Makefiles themselves and config.h, paths.h, Emacs.ad.h, and other generated .h files). console.c: Update list of possibly valid console types. emacs.c: Rationalize the specifying and handling of the type of the first frame. This was originally prompted by a workspace in which I got GTK to compile under C++ and in the process fixed it so it could coexist with X in the same build -- hence, a combined TTY/X/MS-Windows/GTK build is now possible under Cygwin. (However, you can't simultaneously *display* more than one kind of device connection -- but getting that to work is not that difficult. Perhaps a project for a bored grad student. I (ben) would do it but don't see the use.) To make sense of this, I added new switches that can be used to specifically indicate the window system: -x [aka --use-x], -tty \[aka --use-tty], -msw [aka --use-ms-windows], -gtk [aka --use-gtk], and -gnome [aka --use-gnome, same as --use-gtk]. -nw continues as an alias for -tty. When none have been given, XEmacs checks for other parameters implying particular device types (-t -> tty, -display -> x [or should it have same treatment as DISPLAY below?]), and has ad-hoc logic afterwards: if env var DISPLAY is set, use x (or gtk? perhaps should check whether gnome is running), else MS Windows if it exsits, else TTY if it exists, else stream, and you must be running in batch mode. This also fixes an existing bug whereby compiling with no x, no mswin, no tty, when running non- interactively (e.g. to dump) I get "sorry, must have TTY support". emacs.c: Turn on Vstack_trace_on_error so that errors are debuggable even when occurring extremely early in reinitialization. emacs.c: Try to make sure that the user can see message output under Windows (i.e. it doesn't just disappear right away) regardless of when it occurs, e.g. in the middle of creating the first frame. emacs.c: Define new function `emacs-run-status', indicating whether XEmacs is noninteractive or interactive, whether raw, post-dump/pdump-load or run-temacs, whether we are dumping, whether pdump is in effect. event-stream.c: It's "mommas are fat", not "momas are fat". Fix other typo. event-stream.c: Conditionalize in_menu_callback check on HAVE_MENUBARS, because it won't exist on w/o menubar support, lisp.h: More hackery on RETURN_NOT_REACHED. Cygwin v3.2 DOES complain here if RETURN_NOT_REACHED() is blank, as it is for GCC 2.5+. So make it blank only for GCC 2.5 through 2.999999999999999. Declare Vstack_trace_on_error. profile.c: Need to include "profile.h" to fix warnings. sheap.c: Don't fatal() when need to rerun Make, just stderr_out() and exit(0). That way we can distinguish between a dumping failing expectedly (due to lack of stack space, triggering another dump) and unexpectedly, in which case, we want to stop building. (or go on, if -K is given) syntax.c, syntax.h: Use ints where they belong, and enum syntaxcode's where they belong, and fix warnings thereby. syntax.h: Fix crash caused by an edge condition in the syntax-cache macros. text.h: Spacing fixes. xmotif.h: New file, to get around shadowing warnings. EmacsManager.c, event-Xt.c, glyphs-x.c, gui-x.c, input-method-motif.c, xmmanagerp.h, xmprimitivep.h: Include xmotif.h. alloc.c: Conditionalize in_malloc on ERROR_CHECK_MALLOC. config.h.in, file-coding.h, fileio.c, getloadavg.c, select-x.c, signal.c, sysdep.c, sysfile.h, systime.h, text.c, unicode.c: Eliminate HAVE_WIN32_CODING_SYSTEMS, use WIN32_ANY instead. Replace defined (WIN32_NATIVE) || defined (CYGWIN) with WIN32_ANY. lisp.h: More futile attempts to walk and chew gum at the same time when dealing with subr's that don't return.
author ben
date Thu, 20 Feb 2003 08:19:44 +0000
parents 465bd3c7d932
children 4542b72c005e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;; loadup.el --- load up standardly loaded Lisp files for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Copyright (C) 1996 Richard Mlynarik.
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
5 ;; Copyright (C) 1995, 1996, 2003 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; Keywords: internal, dumped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;;; Synched up with: Last synched with FSF 19.30, with wild divergence since.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
31 ;; If you are wanting to add files to be dumped into your local version of
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
32 ;; XEmacs, DO NOT add them here. Use site-init.el or site-load.el instead.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;; This is loaded into a bare XEmacs to make a dumpable one.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
38 ;; Help debug problems.
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
39 (setq stack-trace-on-error t
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
40 load-always-display-messages t)
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
41
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 (when (fboundp 'error)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (error "loadup.el already loaded!"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 (defvar running-xemacs t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 "Non-nil when the current emacs is XEmacs.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 (defvar preloaded-file-list nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 "List of files preloaded into the XEmacs binary image.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (defvar Installation-string nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 "Description of XEmacs installation.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
53 ;(start-profiling)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
54
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
55 (let ((gc-cons-threshold
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
56 ;; setting it low makes loadup incredibly fucking slow.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
57 ;; no need to do it when not dumping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
58 (if (and purify-flag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
59 (not (memq 'quick-build internal-error-checking)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
60 30000 3000000)))
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
61
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
62 ;; really-early-error-handler outputs a stack trace so let's not do it
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
63 ;; twice.
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
64 (let ((stack-trace-on-error nil))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 ;; This is awfully damn early to be getting an error, right?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (call-with-condition-handler 'really-early-error-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 #'(lambda ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
70 ;; Initialize Installation-string. We do it before loading
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 ;; anything so that dumped code can make use of its value.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (setq Installation-string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (save-current-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 (set-buffer (get-buffer-create (generate-new-buffer-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 " *temp*")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 ;; insert-file-contents-internal bogusly calls
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 ;; format-decode without checking if it's defined.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 (fset 'format-decode #'(lambda (f l &optional v) l))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 (insert-file-contents-internal "../Installation")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 (fmakunbound 'format-decode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 (prog1 (buffer-substring)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 (kill-buffer (current-buffer)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
84 (let ((build-root (expand-file-name ".." invocation-directory)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
85 (setq load-path (list (expand-file-name "lisp" build-root)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
86 (setq module-load-path (list (expand-file-name "modules" build-root))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 ;; message not defined yet ...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 (external-debugging-output (format "\nUsing load-path %s" load-path))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 (external-debugging-output (format "\nUsing module-load-path %s"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 module-load-path))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 ;; We don't want to have any undo records in the dumped XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 (buffer-disable-undo (get-buffer "*scratch*"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 ;; lread.c (or src/Makefile.in.in) has prepended
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 ;; "${srcdir}/../lisp/" to load-path, which is how this file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 ;; has been found. At this point, enough of XEmacs has been
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 ;; initialized that we can start dumping "standard" lisp.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 ;; Dumped lisp from external packages is added when we search
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 ;; the package path.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 ;; #### This code is duplicated in two other places.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (let ((temp-path (expand-file-name "." (car load-path))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (setq load-path (nconc (mapcar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 #'(lambda (i) (concat i "/"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 (directory-files temp-path t "^[^-.]"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 nil 'dirs-only))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 (cons (file-name-as-directory temp-path)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 load-path))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
111 (setq load-warn-when-source-only t) ; Set to nil at the end
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 ;; garbage collect after loading every file in an attempt to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 ;; minimize the size of the dumped image (if we don't do this,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 ;; there will be lots of extra space in the data segment filled
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 ;; with garbage-collected junk)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (defun pureload (file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (let ((full-path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 (locate-file file load-path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (if load-ignore-elc-files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 '(".el" "") '(".elc" ".el" "")))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 (if full-path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (prog1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 (load full-path)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
125 ;; but garbage collection really slows down loading.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
126 (unless (memq 'quick-build internal-error-checking)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
127 (garbage-collect)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 (external-debugging-output (format "\nLoad file %s: not found\n"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 file))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 ;; Uncomment in case of trouble
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 ;;(print (format "late-packages: %S" late-packages))
1227
5636ae1c0234 [xemacs-hg @ 2003-01-22 20:31:52 by michaels]
michaels
parents: 462
diff changeset
132 ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-root-p)))
5636ae1c0234 [xemacs-hg @ 2003-01-22 20:31:52 by michaels]
michaels
parents: 462
diff changeset
133 ;;(print (format "guessed-data-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-data-root-p)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 (load (expand-file-name "../lisp/dumped-lisp.el"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 (let ((files preloaded-file-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 (while (setq file (car files))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 (unless (pureload file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 (external-debugging-output "Fatal error during load, aborting")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 (kill-emacs 1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 (setq files (cdr files)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 (when (not (featurep 'toolbar))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 ;; else still define a few functions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 (defun toolbar-button-p (obj) "No toolbar support." nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (defun toolbar-specifier-p (obj) "No toolbar support." nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 (fmakunbound 'pureload))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (packages-load-package-dumped-lisps late-package-load-path)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 )) ;; end of call-with-condition-handler
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
154
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
155 ) ; (let ((stack-trace-on-error nil)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 ;; Fix up the preloaded file list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 (setq preloaded-file-list (mapcar #'file-name-sans-extension
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 preloaded-file-list))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
161 (setq load-warn-when-source-only nil)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 (setq debugger 'debug)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 (when (member "no-site-file" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 (setq site-start-file nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 ;; If you want additional libraries to be preloaded and their
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 ;; doc strings kept in the DOC file rather than in core,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 ;; you may load them with a "site-load.el" file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 ;; But you must also cause them to be scanned when the DOC file
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
172 ;; is generated. For MS Windows, you must edit ../nt/xemacs.mak.
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
173 ;; For other systems, you must edit ../src/Makefile.in.in.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 (when (load "site-load" t)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
175 (garbage-collect)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
176 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 ;;FSFmacs randomness
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 ;;(if (fboundp 'x-popup-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 ;; (precompute-menubar-bindings))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 ;;; Turn on recording of which commands get rebound,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 ;;; for the sake of the next call to precompute-menubar-bindings.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 ;(setq define-key-rebound-commands nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 ;; Note: all compiled Lisp files loaded above this point
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 ;; must be among the ones parsed by make-docfile
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 ;; to construct DOC. Any that are not processed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 ;; for DOC will not have doc strings in the dumped XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 ;; Don't bother with these if we're running temacs, i.e. if we're
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 ;; just debugging don't waste time finding doc strings.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 ;; purify-flag is nil if called from loadup-el.el.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 (when purify-flag
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 (message "Finding pointers to doc strings...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 (Snarf-documentation "DOC")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 (message "Finding pointers to doc strings...done")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (Verify-documentation))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 ;; Note: You can cause additional libraries to be preloaded
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 ;; by writing a site-init.el that loads them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 ;; See also "site-load" above.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 (when (stringp site-start-file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 (load "site-init" t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 (setq current-load-list nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 (garbage-collect)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 ;;; At this point, we're ready to resume undo recording for scratch.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 (buffer-enable-undo "*scratch*")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
211 ) ;; (let ((gc-cons-threshold [frequent garbage collection when dumping])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
213 ;(stop-profiling)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
214
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
215 ;; yuck! need to insert the function def here, and rewrite the dolist
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
216 ;; loop below.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
217
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
218 ;(defun loadup-profile-results (&optional info stream)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
219 ; "Print profiling info INFO to STREAM in a pretty format.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
220 ;If INFO is omitted, the current profiling info is retrieved using
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
221 ; `get-profiling-info'.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
222 ;If STREAM is omitted, either a *Profiling Results* buffer or standard
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
223 ; output are used, depending on whether the function was called
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
224 ; interactively or not."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
225 ; (interactive)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
226 ; (setq info (if info
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
227 ; (copy-alist info)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
228 ; (get-profiling-info)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
229 ; (when (and (not stream)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
230 ; (interactive-p))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
231 ; (pop-to-buffer (get-buffer-create "*Profiling Results*"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
232 ; (erase-buffer))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
233 ; (let ((standard-output (or stream (if (interactive-p)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
234 ; (current-buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
235 ; standard-output)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
236 ; ;; Calculate the longest function
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
237 ; (maxfunlen (apply #'max
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
238 ; (length "Function Name")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
239 ; (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
240 ; (lambda (el)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
241 ; ;; Functions longer than 50 characters (usually
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
242 ; ;; anonymous functions) don't qualify
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
243 ; (let ((l (length (format "%s" (car el)))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
244 ; (if (< l 50)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
245 ; l 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
246 ; info))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
247 ; (princ (format "%-*s Ticks %%/Total Call Count\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
248 ; maxfunlen "Function Name"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
249 ; (princ (make-string maxfunlen ?=))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
250 ; (princ " ===== ======= ==========\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
251 ; (let ((sum (float (apply #'+ (mapcar #'cdr info)))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
252 ; (let (entry
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
253 ; (entry-list (nreverse (sort info #'cdr-less-than-cdr))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
254 ; (while entry-list
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
255 ; (setq entry (car entry-list))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
256 ; (princ (format "%-*s %-5d %-6.3f %s\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
257 ; maxfunlen (car entry) (cdr entry)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
258 ; (* 100 (/ (cdr entry) sum))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
259 ; (or (gethash (car entry) call-count-profile-table)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
260 ; "")))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
261 ; (setq entry-list (cdr entry-list))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
262 ; (princ (make-string maxfunlen ?-))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
263 ; (princ "---------------------------------\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
264 ; (princ (format "%-*s %-5d %-6.2f\n" maxfunlen "Total" sum 100.0))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
265 ; (princ (format "\n\nOne tick = %g ms\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
266 ; (/ default-profiling-interval 1000.0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
267 ; (and (boundp 'internal-error-checking)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
268 ; internal-error-checking
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
269 ; (princ "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
270 ;WARNING: Error checking is turned on in this XEmacs. This might make
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
271 ; the measurements very unreliable.\n"))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
272 ; (when (and (not stream)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
273 ; (interactive-p))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
274 ; (goto-char (point-min))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
275
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
276 ;(loadup-profile-results nil 'external-debugging-output)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
277
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 ;; Dump into the name `xemacs' (only)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 (when (member "dump" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 (message "Dumping under the name xemacs")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 ;; This is handled earlier in the build process.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 ;; (condition-case () (delete-file "xemacs") (file-error nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 (when (fboundp 'really-free)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 (really-free))
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
285 ;; Make sure we don't dump with debugging messages turned on.
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
286 (setq stack-trace-on-error nil
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1227
diff changeset
287 load-always-display-messages nil)
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
288 (dump-emacs
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
289 (cond
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
290 ((featurep 'infodock) "infodock")
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
291 ;; #### BILL!!!
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
292 ;; If we want to dump under a name other than `xemacs', do that here!
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
293 ;; ((featurep 'gtk) "xemacs-gtk")
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
294 (t "xemacs"))
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
295 "temacs")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 (kill-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 ;; Avoid error if user loads some more libraries now.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 (setq purify-flag nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 (when (member "run-temacs" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (message "\nBootstrapping from temacs...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 ;; Remove all args up to and including "run-temacs"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 ;; run-emacs-from-temacs doesn't actually return anyway.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 (kill-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 ;; XEmacs change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 ;; If you are using 'recompile', then you should have used -l loadup-el.el
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 ;; so that the .el files always get loaded (the .elc files may be out-of-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 ;; date or bad).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 (when (member "recompile" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (setq command-line-args-left (cdr (member "recompile" command-line-args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (batch-byte-recompile-directory)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 (kill-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 ;; For machines with CANNOT_DUMP defined in config.h,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 ;; this file must be loaded each time Emacs is run.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 ;; So run the startup code now.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 (when (not (fboundp 'dump-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 ;; Avoid loading loadup.el a second time!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 (setq command-line-args (cdr (cdr command-line-args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 (eval top-level))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 ;;; loadup.el ends here