annotate lisp/loadup.el @ 826:6728e641994e

[xemacs-hg @ 2002-05-05 11:30:15 by ben] syntax cache, 8-bit-format, lots of code cleanup README.packages: Update info about --package-path. i.c: Create an inheritable event and pass it on to XEmacs, so that ^C can be handled properly. Intercept ^C and signal the event. "Stop Build" in VC++ now works. bytecomp-runtime.el: Doc string changes. compat.el: Some attempts to redo this to make it truly useful and fix the "multiple versions interacting with each other" problem. Not yet done. Currently doesn't work. files.el: Use with-obsolete-variable to avoid warnings in new revert-buffer code. xemacs.mak: Split up CFLAGS into a version without flags specifying the C library. The problem seems to be that minitar depends on zlib, which depends specifically on libc.lib, not on any of the other C libraries. Unless you compile with libc.lib, you get errors -- specifically, no _errno in the other libraries, which must make it something other than an int. (#### But this doesn't seem to obtain in XEmacs, which also uses zlib, and can be linked with any of the C libraries. Maybe zlib is used differently and doesn't need errno, or maybe XEmacs provides an int errno; ... I don't understand. Makefile.in.in: Fix so that packages are around when testing. abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, cmds.c, console-msw.h, console-stream.c, console-x.c, console.c, console.h, data.c, device-msw.c, device.c, device.h, dialog-msw.c, dialog-x.c, dired-msw.c, dired.c, doc.c, doprnt.c, dumper.c, editfns.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, events.h, extents.c, extents.h, faces.c, file-coding.c, file-coding.h, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, frame.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-msw.h, glyphs-x.c, glyphs.c, glyphs.h, gui-msw.c, gui-x.c, gui.h, gutter.h, hash.h, indent.c, insdel.c, intl-win32.c, intl.c, keymap.c, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, marker.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, nas.c, objects-msw.c, objects-x.c, opaque.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, process.h, profile.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, regex.h, scrollbar-msw.c, search.c, select-x.c, specifier.c, specifier.h, symbols.c, symsinit.h, syntax.c, syntax.h, syswindows.h, tests.c, text.c, text.h, tooltalk.c, ui-byhand.c, ui-gtk.c, unicode.c, win32.c, window.c: Another big Ben patch. -- FUNCTIONALITY CHANGES: add partial support for 8-bit-fixed, 16-bit-fixed, and 32-bit-fixed formats. not quite done yet. (in particular, needs functions to actually convert the buffer.) NOTE: lots of changes to regex.c here. also, many new *_fmt() inline funs that take an Internal_Format argument. redo syntax cache code. make the cache per-buffer; keep the cache valid across calls to functions that use it. also keep it valid across insertions/deletions and extent changes, as much as is possible. eliminate the junky regex-reentrancy code by passing in the relevant lisp info to the regex routines as local vars. add general mechanism in extents code for signalling extent changes. fix numerous problems with the case-table implementation; yoshiki never properly transferred many algorithms from old-style to new-style case tables. redo char tables to support a default argument, so that mapping only occurs over changed args. change many chartab functions to accept Lisp_Object instead of Lisp_Char_Table *. comment out the code in font-lock.c by default, because font-lock.el no longer uses it. we should consider eliminating it entirely. Don't output bell as ^G in console-stream when not a TTY. add -mswindows-termination-handle to interface with i.c, so we can properly kill a build. add more error-checking to buffer/string macros. add some additional buffer_or_string_() funs. -- INTERFACE CHANGES AFFECTING MORE CODE: switch the arguments of write_c_string and friends to be consistent with write_fmt_string, which must have printcharfun first. change BI_* macros to BYTE_* for increased clarity; similarly for bi_* local vars. change VOID_TO_LISP to be a one-argument function. eliminate no-longer-needed CVOID_TO_LISP. -- char/string macro changes: rename MAKE_CHAR() to make_emchar() for slightly less confusion with make_char(). (The former generates an Emchar, the latter a Lisp object. Conceivably we should rename make_char() -> wrap_char() and similarly for make_int(), make_float().) Similar changes for other *CHAR* macros -- we now consistently use names with `emchar' whenever we are working with Emchars. Any remaining name with just `char' always refers to a Lisp object. rename macros with XSTRING_* to string_* except for those that reference actual fields in the Lisp_String object, following conventions used elsewhere. rename set_string_{data,length} macros (the only ones to work with a Lisp_String_* instead of a Lisp_Object) to set_lispstringp_* to make the difference clear. try to be consistent about caps vs. lowercase in macro/inline-fun names for chars and such, which wasn't the case before. we now reserve caps either for XFOO_ macros that reference object fields (e.g. XSTRING_DATA) or for things that have non-function semantics, e.g. directly modifying an arg (BREAKUP_EMCHAR) or evaluating an arg (any arg) more than once. otherwise, use lowercase. here is a summary of most of the macros/inline funs changed by all of the above changes: BYTE_*_P -> byte_*_p XSTRING_BYTE -> string_byte set_string_data/length -> set_lispstringp_data/length XSTRING_CHAR_LENGTH -> string_char_length XSTRING_CHAR -> string_emchar INTBYTE_FIRST_BYTE_P -> intbyte_first_byte_p INTBYTE_LEADING_BYTE_P -> intbyte_leading_byte_p charptr_copy_char -> charptr_copy_emchar LEADING_BYTE_* -> leading_byte_* CHAR_* -> EMCHAR_* *_CHAR_* -> *_EMCHAR_* *_CHAR -> *_EMCHAR CHARSET_BY_ -> charset_by_* BYTE_SHIFT_JIS* -> byte_shift_jis* BYTE_BIG5* -> byte_big5* REP_BYTES_BY_FIRST_BYTE -> rep_bytes_by_first_byte char_to_unicode -> emchar_to_unicode valid_char_p -> valid_emchar_p Change intbyte_strcmp -> qxestrcmp_c (duplicated functionality). -- INTERFACE CHANGES AFFECTING LESS CODE: use DECLARE_INLINE_HEADER in various places. remove '#ifdef emacs' from XEmacs-only files. eliminate CHAR_TABLE_VALUE(), which duplicated the functionality of get_char_table(). add BUFFER_TEXT_LOOP to simplify iterations over buffer text. define typedefs for signed and unsigned types of fixed sizes (INT_32_BIT, UINT_32_BIT, etc.). create ALIGN_FOR_TYPE as a higher-level interface onto ALIGN_SIZE; fix code to use it. add charptr_emchar_len to return the text length of the character pointed to by a ptr; use it in place of charcount_to_bytecount(..., 1). add emchar_len to return the text length of a given character. add types Bytexpos and Charxpos to generalize Bytebpos/Bytecount and Charbpos/Charcount, in code (particularly, the extents code and redisplay code) that works with either kind of index. rename redisplay struct params with names such as `charbpos' to e.g. `charpos' when they are e.g. a Charxpos, not a Charbpos. eliminate xxDEFUN in place of DEFUN; no longer necessary with changes awhile back to doc.c. split up big ugly combined list of EXFUNs in lisp.h on a file-by-file basis, since other prototypes are similarly split. rewrite some "*_UNSAFE" macros as inline funs and eliminate the _UNSAFE suffix. move most string code from lisp.h to text.h; the string code and text.h code is now intertwined in such a fashion that they need to be in the same place and partially interleaved. (you can't create forward references for inline funs) automated/lisp-tests.el, automated/symbol-tests.el, automated/test-harness.el: Fix test harness to output FAIL messages to stderr when in batch mode. Fix up some problems in lisp-tests/symbol-tests that were causing spurious failures.
author ben
date Sun, 05 May 2002 11:33:57 +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