annotate lisp/loadup.el @ 617:af57a77cbc92

[xemacs-hg @ 2001-06-18 07:09:50 by ben] --------------------------------------------------------------- DOCUMENTATION FIXES: --------------------------------------------------------------- eval.c: Correct documentation. elhash.c: Doc correction. --------------------------------------------------------------- LISP OBJECT CLEANUP: --------------------------------------------------------------- bytecode.h, buffer.h, casetab.h, chartab.h, console-msw.h, console.h, database.c, device.h, eldap.h, elhash.h, events.h, extents.h, faces.h, file-coding.h, frame.h, glyphs.h, gui-x.h, gui.h, keymap.h, lisp-disunion.h, lisp-union.h, lisp.h, lrecord.h, lstream.h, mule-charset.h, objects.h, opaque.h, postgresql.h, process.h, rangetab.h, specifier.h, toolbar.h, tooltalk.h, ui-gtk.h: Add wrap_* to all objects (it was already there for a few of them) -- an expression to encapsulate a pointer into a Lisp object, rather than the inconvenient XSET*. "wrap" was chosen because "make" as in make_int(), make_char() is not appropriate. (It implies allocation. The issue does not exist for ints and chars because they are not allocated.) Full error checking has been added to these expressions. When used without error checking, non-union build, use of these expressions will incur no loss of efficiency. (In fact, XSET* is now defined in terms of wrap_* in a non-union build.) In a union build, you will also get no loss of efficiency provided that you have a decent optimizing compiler, and a compiler that either understands inlines or automatically inlines those particular functions. (And since people don't normally do their production builds on union, it doesn't matter.) Update the sample Lisp object definition in lrecord.h accordingly. dumper.c: Fix places in dumper that referenced wrap_object to reference its new name, wrap_pointer_1. buffer.c, bufslots.h, conslots.h, console.c, console.h, devslots.h, device.c, device.h, frame.c, frame.h, frameslots.h, window.c, window.h, winslots.h: -- Extract out the Lisp objects of `struct device' into devslots.h, just like for the other structures. -- Extract out the remaining (not copied into the window config) Lisp objects in `struct window' into winslots.h; use different macros (WINDOW_SLOT vs. WINDOW_SAVED_SLOT) to differentiate them. -- Eliminate the `dead' flag of `struct frame', since it duplicates information already available in `framemeths', and fix FRAME_LIVE_P accordingly. (Devices and consoles already work this way.) -- In *slots.h, switch to system where MARKED_SLOT is automatically undef'd at the end of the file. (Follows what winslots.h already does.) -- Update the comments at the beginning of *slots.h to be accurate. -- When making any of the above objects dead, zero it out entirely and reset all Lisp object slots to Qnil. (We were already doing this somewhat, but not consistently.) This (1) Eliminates the possibility of extra objects hanging around that ought to be GC'd, (2) Causes an immediate crash if anyone tries to access a structure in one of these objects, (3) Ensures consistent behavior wrt dead objects. dialog-msw.c: Use internal_object_printer, since this object should not escape. --------------------------------------------------------------- FIXING A CRASH THAT I HIT ONCE (AND A RELATED BAD BEHAVIOR): --------------------------------------------------------------- eval.c: Fix up some comments about the FSF implementation. Fix two nasty bugs: (1) condition_case_unwind frees the conses sitting in the catch->tag slot too quickly, resulting in a crash that I hit. (2) catches need to be unwound one at a time when calling unwind-protect code, rather than all at once at the end; otherwise, incorrect behavior can result. (A comment shows exactly how.) backtrace.h: Improve comment about FSF differences in the handler stack. --------------------------------------------------------------- FIXING A CRASH THAT I REPEATEDLY HIT WHEN USING THE MOUSE WHEEL UNDER MSWINDOWS: --------------------------------------------------------------- Basic idea: My crash is due either to a dead, non-marked, GC-collected frame inside of a window mirror, or a prematurely freed window mirror. We need to mark the Lisp objects inside of window mirrors. Tracking the lifespan of window mirrors and scrollbar instances is extremely hard, and there may well be lurking bugs where such objects are freed too soon. The only safe way to fix these problems (and it fixes both problems at once) is to make both of these structures Lisp objects. lrecord.h, emacs.c, inline.c, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, symsinit.h: Make scrollbar instances actual Lisp objects. Mark the window mirrors in them. inline.c needs to know about scrollbar.h now. Record the new type in lrecord.h. Fix up scrollbar-*.c appropriately. Create a hash table in scrollbar-msw.c so that the scrollbar instances stored in scrollbar HWND's are properly GC-protected. Create complex_vars_of_scrollbar_mswindows() to create the hash table at startup, and call it from emacs.c. Don't store the scrollbar instance as a property of the GTK scrollbar, as it's not used and if we did this, we'd have to separately GC-protect it in a hash table, like in MS Windows. lrecord.h, frame.h, frame.c, frameslots.h, redisplay.c, window.c, window.h: Move mark_window_mirror from redisplay.c to window.c. Make window mirrors actual Lisp objects. Tell lrecord.h about them. Change the window mirror member of struct frame from a pointer to a Lisp object, and add XWINDOW_MIRROR in appropriate places. Mark the scrollbar instances in the window mirror. redisplay.c, redisplay.h, alloc.c: Delete mark_redisplay. Don't call mark_redisplay. We now mark frame-specific structures in mark_frame. NOTE: I also deleted an extremely questionable call to update_frame_window_mirrors(). It was extremely questionable before, and now totally impossible, since it will create Lisp objects during redisplay. frame.c: Mark the scrollbar instances, which are now Lisp objects. Call mark_gutter() here, not in mark_redisplay(). gutter.c: Update comments about correct marking. --------------------------------------------------------------- ISSUES BROUGHT UP BY MARTIN: --------------------------------------------------------------- buffer.h: Put back these macros the way Steve T and I think they ought to be. I already explained in a previous changelog entry why I think these macros should be the way I'd defined them. Once again: We fix these macros so they don't care about the type of their lvalues. The non-C-string equivalents of these already function in the same way, and it's correct because it should be OK to pass in a CBufbyte *, a BufByte *, a Char_Binary *, an UChar_Binary *, etc. The whole reason for these different types is to work around errors caused by signed-vs-unsigned non-matching types. Any possible error that might be caught in a DFC macro would also be caught wherever the argument is used elsewhere. So creating multiple macro versions would add no useful error-checking and just further complicate an already complicated area. As for Martin's "ANSI aliasing" bug, XEmacs is not ANSI-aliasing clean and probably never will be. Unless the board agrees to change XEmacs in this way (and we really don't want to go down that road), this is not a bug. sound.h: Undo Martin's type change. signal.c: Fix problem identified by Martin with Linux and g++ due to non-standard declaration of setitimer(). systime.h: Update the docs for "qxe_" to point out why making the encapsulation explicit is always the right way to go. (setitimer() itself serves as an example.) For 21.4: update-elc-2.el: Correct misplaced parentheses, making lisp/mule not get recompiled.
author ben
date Mon, 18 Jun 2001 07:10:32 +0000
parents 0784d089fdc9
children 5636ae1c0234
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.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995, 1996 Ben Wing.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;; Please do not edit this file. Use site-init.el or site-load.el instead.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ;; This is loaded into a bare XEmacs to make a dumpable one.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 (when (fboundp 'error)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 (error "loadup.el already loaded!"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 (defvar running-xemacs t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 "Non-nil when the current emacs is XEmacs.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 (defvar preloaded-file-list nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 "List of files preloaded into the XEmacs binary image.")
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 Installation-string nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 "Description of XEmacs installation.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
48 ;(start-profiling)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
49
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
50 (let ((gc-cons-threshold
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
51 ;; setting it low makes loadup incredibly fucking slow.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
52 ;; no need to do it when not dumping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
53 (if (and purify-flag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
54 (not (memq 'quick-build internal-error-checking)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
55 30000 3000000)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 ;; This is awfully damn early to be getting an error, right?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 (call-with-condition-handler 'really-early-error-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 #'(lambda ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
61 ;; Initialize Installation-string. We do it before loading
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 ;; anything so that dumped code can make use of its value.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 (setq Installation-string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 (save-current-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (set-buffer (get-buffer-create (generate-new-buffer-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 " *temp*")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 ;; insert-file-contents-internal bogusly calls
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 ;; format-decode without checking if it's defined.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 (fset 'format-decode #'(lambda (f l &optional v) l))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 (insert-file-contents-internal "../Installation")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 (fmakunbound 'format-decode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (prog1 (buffer-substring)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (kill-buffer (current-buffer)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
75 (let ((build-root (expand-file-name ".." invocation-directory)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
76 (setq load-path (list (expand-file-name "lisp" build-root)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
77 (setq module-load-path (list (expand-file-name "modules" build-root))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 ;; message not defined yet ...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 (external-debugging-output (format "\nUsing load-path %s" load-path))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 (external-debugging-output (format "\nUsing module-load-path %s"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 module-load-path))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 ;; 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
85 (buffer-disable-undo (get-buffer "*scratch*"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 ;; Load our first bootstrap support
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 (load "very-early-lisp" nil t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 ;; lread.c (or src/Makefile.in.in) has prepended
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 ;; "${srcdir}/../lisp/" to load-path, which is how this file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 ;; has been found. At this point, enough of XEmacs has been
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 ;; initialized that we can start dumping "standard" lisp.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 ;; Dumped lisp from external packages is added when we search
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 ;; the package path.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 ;; #### This code is duplicated in two other places.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (let ((temp-path (expand-file-name "." (car load-path))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (setq load-path (nconc (mapcar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 #'(lambda (i) (concat i "/"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (directory-files temp-path t "^[^-.]"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 nil 'dirs-only))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (cons (file-name-as-directory temp-path)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 load-path))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 (setq load-warn-when-source-newer t ; Used to be set to nil at the end
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 load-warn-when-source-only t) ; Set to nil at the end
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 ;; garbage collect after loading every file in an attempt to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 ;; 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
110 ;; there will be lots of extra space in the data segment filled
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 ;; with garbage-collected junk)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 (defun pureload (file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 (let ((full-path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (locate-file file load-path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 (if load-ignore-elc-files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 '(".el" "") '(".elc" ".el" "")))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (if full-path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (prog1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 (load full-path)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
120 ;; but garbage collection really slows down loading.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
121 (unless (memq 'quick-build internal-error-checking)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
122 (garbage-collect)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (external-debugging-output (format "\nLoad file %s: not found\n"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 file))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 ;; Uncomment in case of trouble
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 ;;(print (format "late-packages: %S" late-packages))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 (load (expand-file-name "../lisp/dumped-lisp.el"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 (let ((files preloaded-file-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 (while (setq file (car files))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 (unless (pureload file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 (external-debugging-output "Fatal error during load, aborting")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 (kill-emacs 1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 (setq files (cdr files)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 (when (not (featurep 'toolbar))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 ;; else still define a few functions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 (defun toolbar-button-p (obj) "No toolbar support." nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 (defun toolbar-specifier-p (obj) "No toolbar support." nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 (fmakunbound 'pureload))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 (packages-load-package-dumped-lisps late-package-load-path)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 )) ;; end of call-with-condition-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 ;; Fix up the preloaded file list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 (setq preloaded-file-list (mapcar #'file-name-sans-extension
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 preloaded-file-list))
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 (setq load-warn-when-source-newer t ; set to t at top of file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 load-warn-when-source-only nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 (setq debugger 'debug)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 (when (member "no-site-file" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 (setq site-start-file nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 ;; If you want additional libraries to be preloaded and their
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 ;; doc strings kept in the DOC file rather than in core,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 ;; you may load them with a "site-load.el" file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 ;; But you must also cause them to be scanned when the DOC file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 ;; is generated. For VMS, you must edit ../../vms/makedoc.com.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 ;; For other systems, you must edit ../../src/Makefile.in.in.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 (when (load "site-load" t)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
168 (garbage-collect)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
169 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 ;;FSFmacs randomness
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 ;;(if (fboundp 'x-popup-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 ;; (precompute-menubar-bindings))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 ;;; Turn on recording of which commands get rebound,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 ;;; for the sake of the next call to precompute-menubar-bindings.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 ;(setq define-key-rebound-commands nil)
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 ;; Note: all compiled Lisp files loaded above this point
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 ;; must be among the ones parsed by make-docfile
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 ;; to construct DOC. Any that are not processed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 ;; for DOC will not have doc strings in the dumped XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 ;; 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
184 ;; just debugging don't waste time finding doc strings.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 ;; purify-flag is nil if called from loadup-el.el.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 (when purify-flag
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 (message "Finding pointers to doc strings...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 (Snarf-documentation "DOC")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 (message "Finding pointers to doc strings...done")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 (Verify-documentation))
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 ;; Note: You can cause additional libraries to be preloaded
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 ;; by writing a site-init.el that loads them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 ;; See also "site-load" above.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 (when (stringp site-start-file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 (load "site-init" t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (setq current-load-list nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 (garbage-collect)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 ;;; At this point, we're ready to resume undo recording for scratch.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 (buffer-enable-undo "*scratch*")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 ) ;; frequent garbage collection
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
206 ;(stop-profiling)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
207
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
208 ;; 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
209 ;; loop below.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
210
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
211 ;(defun loadup-profile-results (&optional info stream)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
212 ; "Print profiling info INFO to STREAM in a pretty format.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
213 ;If INFO is omitted, the current profiling info is retrieved using
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
214 ; `get-profiling-info'.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
215 ;If STREAM is omitted, either a *Profiling Results* buffer or standard
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
216 ; output are used, depending on whether the function was called
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
217 ; interactively or not."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
218 ; (interactive)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
219 ; (setq info (if info
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
220 ; (copy-alist info)
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 ; (when (and (not stream)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
223 ; (interactive-p))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
224 ; (pop-to-buffer (get-buffer-create "*Profiling Results*"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
225 ; (erase-buffer))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
226 ; (let ((standard-output (or stream (if (interactive-p)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
227 ; (current-buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
228 ; standard-output)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
229 ; ;; Calculate the longest function
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
230 ; (maxfunlen (apply #'max
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
231 ; (length "Function Name")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
232 ; (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
233 ; (lambda (el)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
234 ; ;; Functions longer than 50 characters (usually
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
235 ; ;; anonymous functions) don't qualify
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
236 ; (let ((l (length (format "%s" (car el)))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
237 ; (if (< l 50)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
238 ; l 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
239 ; info))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
240 ; (princ (format "%-*s Ticks %%/Total Call Count\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
241 ; maxfunlen "Function Name"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
242 ; (princ (make-string maxfunlen ?=))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
243 ; (princ " ===== ======= ==========\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
244 ; (let ((sum (float (apply #'+ (mapcar #'cdr info)))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
245 ; (let (entry
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
246 ; (entry-list (nreverse (sort info #'cdr-less-than-cdr))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
247 ; (while entry-list
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
248 ; (setq entry (car entry-list))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
249 ; (princ (format "%-*s %-5d %-6.3f %s\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
250 ; maxfunlen (car entry) (cdr entry)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
251 ; (* 100 (/ (cdr entry) sum))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
252 ; (or (gethash (car entry) call-count-profile-table)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
253 ; "")))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
254 ; (setq entry-list (cdr entry-list))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
255 ; (princ (make-string maxfunlen ?-))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
256 ; (princ "---------------------------------\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
257 ; (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
258 ; (princ (format "\n\nOne tick = %g ms\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
259 ; (/ default-profiling-interval 1000.0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
260 ; (and (boundp 'internal-error-checking)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
261 ; internal-error-checking
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
262 ; (princ "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
263 ;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
264 ; the measurements very unreliable.\n"))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
265 ; (when (and (not stream)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
266 ; (interactive-p))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
267 ; (goto-char (point-min))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
268
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
269 ;(loadup-profile-results nil 'external-debugging-output)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
270
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 ;; Dump into the name `xemacs' (only)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 (when (member "dump" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 (message "Dumping under the name xemacs")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 ;; This is handled earlier in the build process.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 ;; (condition-case () (delete-file "xemacs") (file-error nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 (when (fboundp 'really-free)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 (really-free))
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
278 (dump-emacs
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
279 (cond
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
280 ((featurep 'infodock) "infodock")
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
281 ;; #### BILL!!!
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
282 ;; 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
283 ;; ((featurep 'gtk) "xemacs-gtk")
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
284 (t "xemacs"))
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
285 "temacs")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 (kill-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 ;; Avoid error if user loads some more libraries now.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 (setq purify-flag nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 (when (member "run-temacs" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 (message "\nBootstrapping from temacs...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 ;; Remove all args up to and including "run-temacs"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 ;; run-emacs-from-temacs doesn't actually return anyway.
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 ;; XEmacs change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 ;; 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
300 ;; 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
301 ;; date or bad).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (when (member "recompile" command-line-args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 (setq command-line-args-left (cdr (member "recompile" command-line-args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 (batch-byte-recompile-directory)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 (kill-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 ;; For machines with CANNOT_DUMP defined in config.h,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 ;; this file must be loaded each time Emacs is run.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 ;; So run the startup code now.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 (when (not (fboundp 'dump-emacs))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 ;; Avoid loading loadup.el a second time!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (setq command-line-args (cdr (cdr command-line-args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (eval top-level))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 ;;; loadup.el ends here