|
|
1.1 root 1: ;Load up standardly loaded Lisp files for Emacs.
2: ;; This is loaded into a bare Emacs to make a dumpable one.
3: ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
4:
5: ;; This file is part of GNU Emacs.
6:
7: ;; GNU Emacs is free software; you can redistribute it and/or modify
8: ;; it under the terms of the GNU General Public License as published by
9: ;; the Free Software Foundation; either version 1, or (at your option)
10: ;; any later version.
11:
12: ;; GNU Emacs is distributed in the hope that it will be useful,
13: ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14: ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: ;; GNU General Public License for more details.
16:
17: ;; You should have received a copy of the GNU General Public License
18: ;; along with GNU Emacs; see the file COPYING. If not, write to
19: ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20:
21: ;;; Disable undo in the *scratch* buffer so it doesn't get dumped.
22: (buffer-flush-undo (get-buffer "*scratch*"))
23:
24: (load "subr")
25: (garbage-collect)
26: (load "loaddefs.el") ;Don't get confused if someone compiled loaddefs by mistake.
27: (garbage-collect)
28: (load "simple")
29: (garbage-collect)
30: (load "help")
31: (garbage-collect)
32: (load "files")
33: (garbage-collect)
34: (load "indent")
35: (load "window")
36: (load "paths.el") ;Don't get confused if someone compiled paths by mistake.
37: (garbage-collect)
38: (load "startup")
39: (load "lisp")
40: (garbage-collect)
41: (load "page")
42: (load "register")
43: (garbage-collect)
44: (load "paragraphs")
45: (load "lisp-mode")
46: (garbage-collect)
47: (load "text-mode")
48: (load "fill")
49: (garbage-collect)
50: (load "c-mode")
51: (garbage-collect)
52: (load "isearch")
53: (garbage-collect)
54: (load "replace")
55: (if (eq system-type 'vax-vms)
56: (progn
57: (garbage-collect)
58: (load "vmsproc")))
59: (garbage-collect)
60: (load "abbrev")
61: (garbage-collect)
62: (load "buff-menu")
63: (if (eq system-type 'vax-vms)
64: (progn
65: (garbage-collect)
66: (load "vms-patch")))
67:
68: ;If you want additional libraries to be preloaded and their
69: ;doc strings kept in the DOC file rather than in core,
70: ;you may load them with a "site-load.el" file.
71: ;But you must also cause them to be scanned when the DOC file
72: ;is generated. For VMS, you must edit ../etc/makedoc.com.
73: ;For other systems, you must edit ../src/ymakefile.
74: (if (load "site-load" t)
75: (garbage-collect))
76:
77: (load "version.el") ;Don't get confused if someone compiled version.el by mistake.
78:
79: ;; Note: all compiled Lisp files loaded above this point
80: ;; must be among the ones parsed by make-docfile
81: ;; to construct DOC. Any that are not processed
82: ;; for DOC will not have doc strings in the dumped Emacs.
83:
84: (message "Finding pointers to doc strings...")
85: (if (fboundp 'dump-emacs)
86: (let ((name emacs-version))
87: (while (string-match "[^-+_.a-zA-Z0-9]+" name)
88: (setq name (concat (downcase (substring name 0 (match-beginning 0)))
89: "-"
90: (substring name (match-end 0)))))
91: (copy-file (expand-file-name "../etc/DOC")
92: (concat (expand-file-name "../etc/DOC-") name)
93: t)
94: (Snarf-documentation (concat "DOC-" name)))
95: (Snarf-documentation "DOC"))
96: (message "Finding pointers to doc strings...done")
97:
98: ;Note: You can cause additional libraries to be preloaded
99: ;by writing a site-init.el that loads them.
100: ;See also "site-load" above.
101: (load "site-init" t)
102: (garbage-collect)
103:
104: ;;; Re-enable undo in the *scratch* buffer, so the dumped Emacs will
105: ;;; start up that way.
106: (buffer-enable-undo (get-buffer "*scratch*"))
107:
108: (if (or (equal (nth 3 command-line-args) "dump")
109: (equal (nth 4 command-line-args) "dump"))
110: (if (eq system-type 'vax-vms)
111: (progn
112: (message "Dumping data as file temacs.dump")
113: (dump-emacs "temacs.dump" "temacs")
114: (kill-emacs))
115: (if (fboundp 'dump-emacs-data)
116: ;; Handle the IBM RS/6000, and perhaps eventually other machines.
117: (progn
118: ;; This strange nesting is so that the variable `name'
119: ;; is not bound when the data is dumped.
120: (message "Dumping data as file ../etc/EMACS-DATA")
121: (dump-emacs-data "../etc/EMACS-DATA")
122: (kill-emacs))
123: (let ((name (concat "emacs-" emacs-version)))
124: (while (string-match "[^-+_.a-zA-Z0-9]+" name)
125: (setq name (concat (downcase (substring name 0 (match-beginning 0)))
126: "-"
127: (substring name (match-end 0)))))
128: (message "Dumping under names xemacs and %s" name))
129: (condition-case ()
130: (delete-file "xemacs")
131: (file-error nil))
132: (dump-emacs "xemacs" "temacs")
133: ;; Recompute NAME now, so that it isn't set when we dump.
134: (let ((name (concat "emacs-" emacs-version)))
135: (while (string-match "[^-+_.a-zA-Z0-9]+" name)
136: (setq name (concat (downcase (substring name 0 (match-beginning 0)))
137: "-"
138: (substring name (match-end 0)))))
139: (add-name-to-file "xemacs" name t))
140: (kill-emacs))))
141:
142: ;; Avoid error if user loads some more libraries now.
143: (setq purify-flag nil)
144:
145: ;; For machines with CANNOT_DUMP defined in config.h,
146: ;; this file must be loaded each time Emacs is run.
147: ;; So run the startup code now.
148:
149: (or (fboundp 'dump-emacs)
150: (eval top-level))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.