Skip to content
Newer
Older
100644 458 lines (392 sloc) 18.7 KB
ffa5266 @hraberg Start of Loadup!
authored Sep 4, 2012
1 ;;; loadup.el --- load up standardly loaded Lisp files for Emacs
2
3 ;; Copyright (C) 1985-1986, 1992, 1994, 2001-2012
4 ;; Free Software Foundation, Inc.
5
6 ;; Maintainer: FSF
7 ;; Keywords: internal
8 ;; Package: emacs
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24
25 ;;; Commentary:
26
27 ;; This is loaded into a bare Emacs to make a dumpable one.
28
29 ;; If you add/remove Lisp files to be loaded here, consider the
30 ;; following issues:
31
32 ;; i) Any file loaded on any platform should appear in $lisp in src/lisp.mk.
33 ;; Use the .el or .elc version as appropriate.
34
35 ;; This ensures both that the Lisp files are compiled (if necessary)
36 ;; before the emacs executable is dumped, and that they are passed to
37 ;; make-docfile. (Any that are not processed for DOC will not have
38 ;; doc strings in the dumped Emacs.) Because of this:
39
40 ;; ii) If the file is loaded uncompiled, it should (where possible)
41 ;; obey the doc-string conventions expected by make-docfile.
42
43 ;;; Code:
44
aa6666c @hraberg Initial comment
authored Feb 28, 2013
45 ;; DEUCE: deuce.main loads this file and prepend src/bootstrap-emacs to the command line to emulate CANNOT_DUMP.
7fe9976 @hraberg Welcome to GNU Emacs
authored Mar 3, 2013
46 ;; Unlike in Emacs, this file is loaded every time Deuce starts, but the referenced Emacs Lisp will normally be AOT compiled.
a210236 @hraberg Hack to override copy-list from cl.el didn't work properly
authored Mar 5, 2013
47 ;; Deuce compiles Emacs Lisp as it loads it. This file takes more than 10 minutes to load the first time.
48 ;; Just because things here load and compile doens't mean they work, they depend on the primitives under deuce.emacs.
49 ;; These, which are normal Clojure, gets AOT compiled via lein uberjar.
aa6666c @hraberg Initial comment
authored Feb 28, 2013
50
ffa5266 @hraberg Start of Loadup!
authored Sep 4, 2012
51 ;; Add subdirectories to the load-path for files that might get
52 ;; autoloaded when bootstrapping.
53 (if (or (equal (nth 3 command-line-args) "bootstrap")
54 (equal (nth 4 command-line-args) "bootstrap")
55 (equal (nth 3 command-line-args) "unidata-gen.el")
56 (equal (nth 4 command-line-args) "unidata-gen-files")
57 ;; In case CANNOT_DUMP.
58 (string-match "src/bootstrap-emacs" (nth 0 command-line-args)))
59 (let ((dir (car load-path)))
60 ;; We'll probably overflow the pure space.
61 (setq purify-flag nil)
62 (setq load-path (list dir
63 (expand-file-name "emacs-lisp" dir)
64 (expand-file-name "language" dir)
65 (expand-file-name "international" dir)
66 (expand-file-name "textmodes" dir)))))
67
68 (if (eq t purify-flag)
69 ;; Hash consing saved around 11% of pure space in my tests.
70 (setq purify-flag (make-hash-table :test 'equal)))
71
72 (message "Using load-path %s" load-path)
73
74 (if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
75 (member (nth 4 command-line-args) '("dump" "bootstrap")))
76 ;; To reduce the size of dumped Emacs, we avoid making huge
77 ;; char-tables.
78 (setq inhibit-load-charset-map t))
79
80 ;; We don't want to have any undo records in the dumped Emacs.
81 (set-buffer "*scratch*")
82 (setq buffer-undo-list t)
83
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
84 ;; DEUCE: Handles inlining, won't be used, but other parts references its macros.
34d234b @hraberg 24.3 will have to wait, defmacro and defun are defined in terms of de…
authored Mar 14, 2013
85 ;; 24.3 Note: Defines defmacro using defalias + lambda and then defun using it here.
86 ;; Handles doc strings etc, so we only need to support 'lambda'.
87 ;; Probably nice in theory, but will be messier to bootstrap as Deuce core will require byte-run.el to work.
20fa1b5 @hraberg delete/delq were totally broken. Alias fixes. Macros using true as sy…
authored Mar 14, 2013
88 ;; If doing this, we should consider using real backquote.el as well.
ffa5266 @hraberg Start of Loadup!
authored Sep 4, 2012
89 (load "emacs-lisp/byte-run")
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
90 ;; DEUCE: backquote is used by lread.c, and not used in Deuce to avoid having the reader depending on Emacs Lisp.
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
91 ;; Instead I use the internal SyntaxQuoteReader from Clojure - may revisit.
ffa5266 @hraberg Start of Loadup!
authored Sep 4, 2012
92 (load "emacs-lisp/backquote")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
93 ;; DEUCE: Lisp helpers/setup, some things, like dolist etc, are replaced by cl.el
ffa5266 @hraberg Start of Loadup!
authored Sep 4, 2012
94 (load "subr")
95
96 ;; Do it after subr, since both after-load-functions and add-hook are
97 ;; implemented in subr.el.
98 (add-hook 'after-load-functions (lambda (f) (garbage-collect)))
99
100 ;; We specify .el in case someone compiled version.el by mistake.
101 (load "version.el")
102
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
103 ;; DEUCE: Support for defining widgets as used by customize. Not used for hyperlinks etc, see button below.
b87413e @hraberg lexical-let and macroexpand fixes. Various tightening of core fns
authored Mar 12, 2013
104 ;; No real intention of supporting it (yet), but custom assumes its there.
6856768 @hraberg custom.el loads - hacky way to detect and accept unbound fns during load
authored Sep 9, 2012
105 (load "widget")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
106 ;; DEUCE: custom subsystem, not strictly necessary, but other things depend on it being there.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
107 (load "custom")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
108 ;; DEUCE: Yes/No prompt.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
109 (load "emacs-lisp/map-ynp")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
110 ;; DEUCE: Adds custom support for built in variables.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
111 (load "cus-start")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
112 ;; DEUCE: MULE defines and deals with character encodings, won't be used, but some fns might be needed.
c33518f @hraberg Stubbing out MULE
authored Mar 15, 2013
113 ;; We're runningw without MULE for now, may revisit.
114 ;; (load "international/mule")
115 ;; (load "international/mule-conf")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
116 ;; DEUCE: unix environment helpers, causes cl.el to be loaded.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
117 (load "env")
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 5, 2013
118
c33518f @hraberg Stubbing out MULE
authored Mar 15, 2013
119 ;; DEUCE: Support for loading files with different "formats", not part of Mule.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
120 (load "format")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
121
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
122 ;; DEUCE: All basic editor key bindings are setup here - many refer to fns loaded later on.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
123 (load "bindings")
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
124 ;; DEUCE: Defines C-x 2, C-x o etc.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
125 (load "window") ; Needed here for `replace-buffer-in-windows'.
126 (setq load-source-file-function 'load-with-code-conversion)
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
127 ;; DEUCE: Defines C-x C-f, C-x C-s etc.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
128 (load "files")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
129
130 ;; DEUCE: custom extensions for faces
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
131 (load "cus-face")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
132 ;; DEUCE: tty-run-terminal-initialization is defined here, uses TERM to load term/xterm.el (for example), we might add our own / sidestep.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
133 (load "faces") ; after here, `defface' may be used.
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
134
135 ;; DEUCE: button provides hyperlinks even in keyboard mode, needed for the startup screen.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
136 (load "button")
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
137 ;; DEUCE: Actual startup of Emacs, parses command lines, opens the first frame and displays welcome and *scratch*
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
138 ;; Loads init.el, but we'll surpress that for now. We want to support emacs -nw -q
811f10e @hraberg A few more comments
authored Feb 28, 2013
139 ;; Also loads subdirs.el which extends the load-path. Tries to load leim for international input, but should not be needed.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
140 (load "startup")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
141
142 ;; DEUCE: At this point normal-top-level will be available.
811f10e @hraberg A few more comments
authored Feb 28, 2013
143 ;; Calling it (see end of this file) should start Emacs and clojure-lanterna can be intialized.
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
144 ;; I want to drive out the boot backwards based on what's needed at this point - not mimic the C.
145 ;; Actual details of the init of different subsystems are a mix of C (hence .clj) and Emacs Lisp.
146 ;; See emacs.c for the lowlevel init, also: frame.c and window.c.
147 ;; The GNU Emacs buffer will be shown: "Welcome to GNU Emacs, one component of the GNU/Linux operating system."
148
a210236 @hraberg Hack to override copy-list from cl.el didn't work properly
authored Mar 5, 2013
149 ;; DEUCE: Suffixed .el files don't get .class files.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
150 (condition-case nil
151 ;; Don't get confused if someone compiled this by mistake.
152 (load "loaddefs.el")
153 ;; In case loaddefs hasn't been generated yet.
154 (file-error (load "ldefs-boot.el")))
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
155
7fe9976 @hraberg Welcome to GNU Emacs
authored Mar 3, 2013
156 ;; DEUCE: minibuffer implements completion, the actual minibuffer is (not yet) in minibuf.clj
92accbe @hraberg Notes about the pcase autoload issue
authored Mar 11, 2013
157 ;; Blows up when autoloading/compiling pcase.el - can be worked around by C-c C-k in slime:
158 ;; Swank uses clojure.core/load-file which is Compiler/loadFile to do this.
159 ;; require etc. use load-lib which uses RT/load which deals with .class files etc.
160 ;; Some difference causes a InstantiationException in completion-at-point (which autoloads pcase).
7d4ccdb @hraberg Slightly cleaaned up version of this pcase/minibuffer hack, using Ema…
authored Mar 11, 2013
161 ;; Deuce extension to catch Java exceptions, should be condition-case, but this is easier.
b87413e @hraberg lexical-let and macroexpand fixes. Various tightening of core fns
authored Mar 12, 2013
162 ;; Both these files use: -*- lexical-binding: t -*- which we don't adhere to yet.
163 (when (catch 'java.lang.ReflectiveOperationException
7d4ccdb @hraberg Slightly cleaaned up version of this pcase/minibuffer hack, using Ema…
authored Mar 11, 2013
164 (load "minibuffer" nil t))
165 (load "pcase.el" nil t))
c6e09d3 @hraberg Slightly changed load model, trying to delay evaluation/compilation o…
authored Mar 9, 2013
166 (load "minibuffer")
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
167 ;; DEUCE: abbrev mode, referenced by simple below (to turn it off at times)
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
168 (load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table.
13751ef @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
169 ;; DEUCE: Massive support file for Emacs, adds completion, paren matching, line movement and various things.
f5ca92f @hraberg Backquote mess when there are dots
authored Mar 11, 2013
170 (load "simple")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
171
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 4, 2013
172 (load "help")
6c93b98 @hraberg The annotated guide to the Emacs boot you all been waiting for.
authored Feb 28, 2013
173
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
174 (load "jka-cmpr-hook")
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 4, 2013
175 (load "epa-hook")
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
176 ;; Any Emacs Lisp source file (*.el) loaded here after can contain
177 ;; multilingual text.
c33518f @hraberg Stubbing out MULE
authored Mar 15, 2013
178 ;; (load "international/mule-cmds")
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
179 (load "case-table")
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
180 ;; This file doesn't exist when building a development version of Emacs
181 ;; from the repository. It is generated just after temacs is built.
c33518f @hraberg Stubbing out MULE
authored Mar 15, 2013
182 ;; (load "international/charprop.el" t)
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
183 ;; DEUCE: NPE in case-table/set-case-syntax-pair
8df2737 @hraberg A hack to get the pcase/minibuffer combo loading, Clojure throws Inst…
authored Mar 11, 2013
184 ;; Requires better emulation of entire chartab subsystem, will revist.
185 ;; (load "international/characters")
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
186 (load "composite")
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
187
a210236 @hraberg Hack to override copy-list from cl.el didn't work properly
authored Mar 5, 2013
188 ;; DEUCE: Lanugage support to be revisited, one language must be defined.
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
189 ;; Load language-specific files.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
190 ;; (load "language/chinese")
191 ;; (load "language/cyrillic")
192 ;; (load "language/indian")
193 ;; (load "language/sinhala")
c33518f @hraberg Stubbing out MULE
authored Mar 15, 2013
194 ;; (load "language/english")
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
195 ;; (load "language/ethiopic")
196 ;; (load "language/european")
197 ;; (load "language/czech")
198 ;; (load "language/slovak")
199 ;; (load "language/romanian")
200 ;; (load "language/greek")
201 ;; (load "language/hebrew")
202 ;; (load "language/japanese")
203 ;; (load "language/korean")
204 ;; (load "language/lao")
205 ;; (load "language/tai-viet")
206 ;; (load "language/thai")
207 ;; (load "language/tibetan")
208 ;; (load "language/vietnamese")
209 ;; (load "language/misc-lang")
210 ;; (load "language/utf-8-lang")
211 ;; (load "language/georgian")
212 ;; (load "language/khmer")
213 ;; (load "language/burmese")
214 ;; (load "language/cham")
215
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
216 (load "indent")
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
217 (load "frame")
7fe9976 @hraberg Welcome to GNU Emacs
authored Mar 3, 2013
218 ;; DEUCE: Referenced from startup.
219 ;; The generated init class gets invalid method code length, but loading the .clj itself works:
220 ;; rm target/classes/term/tty_colors__init.class
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
221 ;; (load "term/tty-colors")
222 ;; DEUCE: Hack to not compile tty-colors for now, see above.
223 (load "term/tty-colors.el")
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
224 (load "font-core")
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
225 ;; facemenu must be loaded before font-lock, because `facemenu-keymap'
226 ;; needs to be defined when font-lock is loaded.
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 4, 2013
227 (load "facemenu")
825e271 @hraberg let* bindings that use delayed-eval doesn't work, hack for a few know…
authored Mar 13, 2013
228 ;; DEUCE: (void-variable method) cl-macs/cl-setf-do-modify refers to cl-setf-simple-store-p before its defined inside a let
229 ;; Hack to work around this is in deuce.emacs by predefining cl-setf-simple-store-p.
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
230 (load "emacs-lisp/syntax")
9b5c37d @hraberg First stab at try-completion all-completions minibuffer stuff
authored Mar 13, 2013
231 ;; DEUCE: Has hack in deuce.emacs for regexp-opt/regexp-opt-group to be predefined, as its used inside let, see above.
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
232 (load "font-lock")
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
233 (load "jit-lock")
234
235 (if (fboundp 'track-mouse)
236 (progn
237 (load "mouse")
238 (and (boundp 'x-toolkit-scroll-bars)
239 (load "scroll-bar"))
240 (load "select")))
902abb1 @hraberg 2 issues left
authored Mar 14, 2013
241 ;; DEUCE: InstantiationException in timer-activate, comes from 'with-no-warnings with 'cl-struct-setf-expander
242 ;; Hack to get around this by pre-defining 'last' in deuce.emacs
091788b @hraberg Updating deps, Clojure 1.7.0 and Timbre 4.3.1. Fixing reflection warn…
authored Apr 22, 2016
243 ;; In Clojure 1.8.0 this fails with No setf-method known for timer--high-seconds.
d7dc760 @hraberg No need to skip stuff, we'll get back to the welcome screen eventually
authored Mar 11, 2013
244 (load "emacs-lisp/timer")
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
245 (load "isearch")
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 4, 2013
246 (load "rfn-eshadow")
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
247
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
248 (load "menu-bar")
7fe9976 @hraberg Welcome to GNU Emacs
authored Mar 3, 2013
249 (load "paths.el") ;Don't get confused if someone compiled paths by mistake.
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
250 (load "emacs-lisp/lisp")
251 (load "textmodes/page")
20fa1b5 @hraberg delete/delq were totally broken. Alias fixes. Macros using true as sy…
authored Mar 14, 2013
252 ;; DEUCE: Sanity check against http://www.gnu.org/software/emacs/manual/html_node/cl/Structures.html (see emacs-lisp/timer above).
fa55b93 @hraberg Basic buffers
authored Mar 16, 2013
253 ;; There's a totally wonderful error that comes from this guy occasionally when runnng as uberjar:
254 ;; ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Named
255 ;; Some cl argument list expansion goes wrong and pass in a list inside the argument list.
fb1f31a @hraberg Changes to how classpath loadpath work a bit. Stubbing out define-com…
authored Mar 18, 2013
256 ;; The root cause seems to be define-compiler-macro. Stubbing it out for now, should be "safe".
d7dc760 @hraberg No need to skip stuff, we'll get back to the welcome screen eventually
authored Mar 11, 2013
257 (load "register")
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 4, 2013
258 (load "textmodes/paragraphs")
20fa1b5 @hraberg delete/delq were totally broken. Alias fixes. Macros using true as sy…
authored Mar 14, 2013
259 ;; DEUCE: Hack in deuce.emacs to deal with (void-variable sorted-strings) - same delayed-eval issue as font-lock above.
d7dc760 @hraberg No need to skip stuff, we'll get back to the welcome screen eventually
authored Mar 11, 2013
260 (load "emacs-lisp/lisp-mode")
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
261 (load "textmodes/text-mode")
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
262 (load "textmodes/fill")
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
263
69e1e79 @hraberg Lots of new files loading. Debating the time for macro autoloads..
authored Mar 9, 2013
264 (load "replace")
ff388ac @hraberg Making it build and run on my Mac. Updated deps. Fixed *emacs-compile…
authored Jan 18, 2014
265 ;; DEUCE: Hack to not compile buff-menu for now, its buffer-menu-other-window and Buffer-menu-other-window clashes on Mac.
266 (load "buff-menu.el")
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
267
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
268 (if (fboundp 'x-create-frame)
269 (progn
270 (load "fringe")
271 (load "image")
272 (load "international/fontset")
273 (load "dnd")
274 (load "tool-bar")))
275
276 (if (featurep 'dynamic-setting)
277 (load "dynamic-setting"))
278
279 (if (featurep 'x)
280 (progn
281 (load "x-dnd")
282 (load "term/common-win")
283 (load "term/x-win")))
284
285 (if (eq system-type 'windows-nt)
286 (progn
287 (load "w32-vars")
288 (load "term/common-win")
289 (load "term/w32-win")
290 (load "ls-lisp")
291 (load "disp-table")
292 (load "dos-w32")
293 (load "w32-fns")))
294 (if (eq system-type 'ms-dos)
295 (progn
296 (load "dos-w32")
297 (load "dos-fns")
298 (load "dos-vars")
299 ;; Don't load term/common-win: it isn't appropriate for the `pc'
300 ;; ``window system'', which generally behaves like a terminal.
301 (load "term/pc-win")
302 (load "ls-lisp")
303 (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el
304 (if (featurep 'ns)
305 (progn
306 (load "term/common-win")
307 (load "term/ns-win")))
308 (if (fboundp 'x-create-frame)
309 ;; Do it after loading term/foo-win.el since the value of the
310 ;; mouse-wheel-*-event vars depends on those files being loaded or not.
311 (load "mwheel"))
312
313 ;; Preload some constants and floating point functions.
314 (load "emacs-lisp/float-sup")
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
315
d7dc760 @hraberg No need to skip stuff, we'll get back to the welcome screen eventually
authored Mar 11, 2013
316 (load "vc/vc-hooks")
317 (load "vc/ediff-hook")
ecf4550 @hraberg Various bits, a few more files loaded, some uncertainty around consif…
authored Mar 4, 2013
318 (if (fboundp 'x-show-tip) (load "tooltip"))
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
319
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
320 ;; DEUCE: Relevant parts of loadup done. A vanilla emacs -nw -q.
7e2e85b @hraberg Milestone comment
authored Feb 28, 2013
321
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
322 ;; DEUCE: site-load, not supported, will revisit.
323 ;; ;If you want additional libraries to be preloaded and their
324 ;; ;doc strings kept in the DOC file rather than in core,
325 ;; ;you may load them with a "site-load.el" file.
326 ;; ;But you must also cause them to be scanned when the DOC file
327 ;; ;is generated.
328 ;; ;For other systems, you must edit ../src/Makefile.in.
329 ;; (load "site-load" t)
330
331 ;; DEUCE: build version number code, not used by Deuce.
d7c16e8 @hraberg Saner print-dup vs pprint. More realistic ugly stubs for coding/chars…
authored Mar 4, 2013
332 ;; Determine which last version number to use
333 ;; based on the executables that now exist.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
334 ;; (if (and (or (equal (nth 3 command-line-args) "dump")
335 ;; (equal (nth 4 command-line-args) "dump"))
336 ;; (not (eq system-type 'ms-dos)))
337 ;; (let* ((base (concat "emacs-" emacs-version "."))
338 ;; (files (file-name-all-completions base default-directory))
339 ;; (versions (mapcar (function (lambda (name)
340 ;; (string-to-number (substring name (length base)))))
341 ;; files)))
342 ;; ;; `emacs-version' is a constant, so we shouldn't change it with `setq'.
343 ;; (defconst emacs-version
344 ;; (format "%s.%d"
345 ;; emacs-version (if versions (1+ (apply 'max versions)) 1)))))
346
347
348 ;; DEUCE: doc strings are embedded inside Clojure, not needed
349 ;; (message "Finding pointers to doc strings...")
350 ;; (if (or (equal (nth 3 command-line-args) "dump")
351 ;; (equal (nth 4 command-line-args) "dump"))
352 ;; (let ((name emacs-version))
353 ;; (while (string-match "[^-+_.a-zA-Z0-9]+" name)
354 ;; (setq name (concat (downcase (substring name 0 (match-beginning 0)))
355 ;; "-"
356 ;; (substring name (match-end 0)))))
357 ;; (if (memq system-type '(ms-dos windows-nt))
358 ;; (setq name (expand-file-name
359 ;; (if (fboundp 'x-create-frame) "DOC-X" "DOC") "../etc"))
360 ;; (setq name (concat (expand-file-name "../etc/DOC-") name))
361 ;; (if (file-exists-p name)
362 ;; (delete-file name))
363 ;; (copy-file (expand-file-name "../etc/DOC") name t))
364 ;; (Snarf-documentation (file-name-nondirectory name)))
365 ;; (condition-case nil
366 ;; (Snarf-documentation "DOC")
367 ;; (error nil)))
368 ;; (message "Finding pointers to doc strings...done")
369
370 ;; DEUCE: site-init, not supported
371 ;; ;; Note: You can cause additional libraries to be preloaded
372 ;; ;; by writing a site-init.el that loads them.
373 ;; ;; See also "site-load" above.
374 ;; (load "site-init" t)
375
376 (setq current-load-list nil)
377
378 ;; We keep the load-history data in PURE space.
379 ;; Make sure that the spine of the list is not in pure space because it can
380 ;; be destructively mutated in lread.c:build_load_history.
381 (setq load-history (mapcar 'purecopy load-history))
382
383 (set-buffer-modified-p nil)
384
385 ;; reset the load-path. See lread.c:init_lread why.
386 (if (or (equal (nth 3 command-line-args) "bootstrap")
387 (equal (nth 4 command-line-args) "bootstrap"))
388 (setcdr load-path nil))
b2a8397 @hraberg Some subtle issues with classpath relative dirs caused a 900 entry lo…
authored Mar 22, 2013
389 ;; DEUCE: Resetting load-path to (""), subdirs.el will rebuild it.
390 (setcdr load-path nil)
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
391
392 (remove-hook 'after-load-functions (lambda (f) (garbage-collect)))
393
394 (setq inhibit-load-charset-map nil)
395 (clear-charset-maps)
396 (garbage-collect)
397
398 ;; At this point, we're ready to resume undo recording for scratch.
399 (buffer-enable-undo "*scratch*")
400
401 ;; Avoid error if user loads some more libraries now and make sure the
402 ;; hash-consing hash table is GC'd.
403 (setq purify-flag nil)
404
405 (if (null (garbage-collect))
406 (setq pure-space-overflow t))
407
3f1cd23 @hraberg A few more comments
authored Feb 28, 2013
408 ;; DEUCE: This writes out and dumps the actual emacs binary, we will use lein uberjar with AOT.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
409 ;; (if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
410 ;; (member (nth 4 command-line-args) '("dump" "bootstrap")))
411 ;; (progn
412 ;; (if (memq system-type '(ms-dos windows-nt cygwin))
413 ;; (message "Dumping under the name emacs")
414 ;; (message "Dumping under the name emacs"))
415 ;; (condition-case ()
416 ;; (delete-file "emacs")
417 ;; (file-error nil))
418 ;; ;; We used to dump under the name xemacs, but that occasionally
419 ;; ;; confused people installing Emacs (they'd install the file
420 ;; ;; under the name `xemacs'), and it's inconsistent with every
421 ;; ;; other GNU program's build process.
422 ;; (dump-emacs "emacs" "temacs")
423 ;; (message "%d pure bytes used" pure-bytes-used)
424 ;; ;; Recompute NAME now, so that it isn't set when we dump.
425 ;; (if (not (or (memq system-type '(ms-dos windows-nt))
426 ;; ;; Don't bother adding another name if we're just
427 ;; ;; building bootstrap-emacs.
428 ;; (equal (nth 3 command-line-args) "bootstrap")
429 ;; (equal (nth 4 command-line-args) "bootstrap")))
430 ;; (let ((name (concat "emacs-" emacs-version)))
431 ;; (while (string-match "[^-+_.a-zA-Z0-9]+" name)
432 ;; (setq name (concat (downcase (substring name 0 (match-beginning 0)))
433 ;; "-"
434 ;; (substring name (match-end 0)))))
435 ;; (message "Adding name %s" name)
436 ;; (add-name-to-file "emacs" name t)))
437 ;; (kill-emacs)))
438
439 ;; For machines with CANNOT_DUMP defined in config.h,
440 ;; this file must be loaded each time Emacs is run.
441 ;; So run the startup code now. First, remove `-l loadup' from args.
442
443 (if (and (equal (nth 1 command-line-args) "-l")
444 (equal (nth 2 command-line-args) "loadup"))
445 (setcdr command-line-args (nthcdr 3 command-line-args)))
446
aa6666c @hraberg Initial comment
authored Feb 28, 2013
447 ;; DEUCE: Starts Emacs. This entire file will be AOT compiled together with referenced Emacs Lisp.
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
448 ;; deuce-loadup.el is loaded in deuce.main. Further C init goes into deuce.emacs.
449 (eval top-level)
450
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
451
452 ;; Local Variables:
453 ;; no-byte-compile: t
454 ;; no-update-autoloads: t
455 ;; End:
2ad3539 @hraberg Full annotated deuce-loadup.el, some minor changes and comments to de…
authored Feb 28, 2013
456
c533121 @hraberg Uncommenting out some more stuff
authored Mar 11, 2013
457 ;;; loadup.el ends here
Something went wrong with that request. Please try again.