1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
//! Emacs 31.1 library segments loaded after the core prelude.
//!
//! Each segment is an upstream file included verbatim (see `src/lisp/`), or a
//! table of `autoload` forms for libraries that [`crate::bundled`] loads on
//! first use.
/// time-date.el, verbatim. Its `format-seconds`, `seconds-to-string`,
/// `date-to-time`, `decoded-time-add` and friends are preloaded here the way
/// the rest of the prelude is.
pub const TIME_DATE: &str = include_str!;
/// Definitions from Emacs 31.1 `subr.el` and `simple.el` the core prelude lacked,
/// verbatim.
pub const SUBR_31: &str = include_str!;
/// fileio.c's `find-file-name-handler`, and files.el's `file-truename`,
/// `file-chase-links` and `file-name-non-special`, verbatim.
pub const FILES_31: &str = include_str!;
/// Ports of the C primitives of `keymap.c` and `keyboard.c` that read keymaps
/// and event symbols.
pub const KEYMAP_C: &str = include_str!;
/// `textprop.c` queries that combine overlays with text properties.
pub const TEXTPROP_C: &str = include_str!;
/// `map.el`'s generic functions, dispatched by hand on `list`, `hash-table` and
/// `array`.
pub const MAP_31: &str = include_str!;
/// editfns.c's fields, minibuf.c's `minibufferp`, character.c's
/// `char-script-table` and keyboard.c's overriding keymaps: the C the editing
/// libraries below call.
pub const EDITFNS_C: &str = include_str!;
/// category.c, and the category data of characters.el.
pub const CATEGORY_C: &str = include_str!;
/// indent.el, verbatim (preloaded by loadup.el).
pub const INDENT: &str = include_str!;
/// newcomment.el, verbatim (preloaded by loadup.el).
pub const NEWCOMMENT: &str = include_str!;
/// textmodes/paragraphs.el, verbatim (preloaded by loadup.el).
pub const PARAGRAPHS: &str = include_str!;
/// textmodes/fill.el, verbatim (preloaded by loadup.el).
pub const FILL: &str = include_str!;
/// simple.el, emacs-lisp/lisp.el and text-mode.el commands the core prelude
/// lacked, verbatim.
pub const SIMPLE_31: &str = include_str!;
/// simple.el's undo commands and subr.el's change groups, verbatim.
pub const UNDO_31: &str = include_str!;
/// window.c's variables.
pub const WINDOW_C: &str = include_str!;
/// subr.el, simple.el and frame.el functions over the window model of
/// src/window.rs, verbatim.
pub const WINDOW_31: &str = include_str!;
/// window.el, verbatim (preloaded by loadup.el).
pub const WINDOW_EL: &str = include_str!;
/// emacs-lisp/timer.el, verbatim (preloaded by loadup.el). Timers are made and
/// listed; nothing runs them (there is no command loop to be idle in).
pub const TIMER: &str = include_str!;
/// isearch.el's search core and replace.el's replacement commands, verbatim.
pub const REPLACE_31: &str = include_str!;
/// The `;;;###autoload` entries of the bundled libraries. Calling one loads its
/// library through `autoload-do-load`; the rest of a library's functions stay
/// unbound until it is `require`d, as in a stock `emacs -Q`.
pub const AUTOLOADS: &str = r#"
(autoload 'parse-time-string "parse-time" nil nil)
(autoload 'char-fold-to-regexp "char-fold" nil nil)
(autoload 'describe-char-fold-equivalences "char-fold" nil t)
(autoload 'rx "rx" nil nil t)
(autoload 'rx-to-string "rx" nil nil)
(autoload 'rx-let "rx" nil nil t)
(autoload 'rx-let-eval "rx" nil nil t)
(autoload 'rx-define "rx" nil nil t)
(autoload 'rx--pcase-macroexpander "rx" nil nil)
(define-symbol-prop 'rx 'pcase-macroexpander 'rx--pcase-macroexpander)
"#;
/// The `defface' forms of every face batch Emacs has, verbatim, in face-id
/// order; loaded first so later definitions keep that order.
pub const FACES_31: &str = include_str!;
/// Definitions from subr.el, files.el, minibuffer.el, font-core.el, startup.el,
/// syntax.el and easy-mmode.el that the three Lisp-mode libraries below need
/// while they load, verbatim.
pub const LISP_MODES_DEPS_31: &str = include_str!;
/// emacs-lisp/easymenu.el, verbatim (preloaded by loadup.el).
pub const EASYMENU: &str = include_str!;
/// progmodes/prog-mode.el, verbatim (preloaded by loadup.el).
pub const PROG_MODE: &str = include_str!;
/// emacs-lisp/lisp-mode.el, verbatim (preloaded by loadup.el).
pub const LISP_MODE: &str = include_str!;
/// progmodes/elisp-mode.el, verbatim (preloaded by loadup.el).
pub const ELISP_MODE: &str = include_str!;
/// startup.el's `command-line', verbatim: the step that puts `*scratch*' in
/// `initial-major-mode', which is why `emacs -Q --batch' evaluates its forms
/// in a `lisp-interaction-mode' buffer.
pub const STARTUP_SCRATCH: &str = r#"
;; If *scratch* exists and init file didn't change its mode, initialize it.
(if (get-buffer "*scratch*")
(with-current-buffer "*scratch*"
(if (eq major-mode 'fundamental-mode)
(funcall initial-major-mode))))
"#;
/// Every segment, in load order.
pub const SEGMENTS: = ;