author | wenzelm |
Wed, 27 Feb 2013 19:39:16 +0100 | |
changeset 51297 | d9f3d91208af |
parent 50201 | c26369c9eda6 |
child 51658 | 21c10672633b |
permissions | -rw-r--r-- |
21642 | 1 |
(* Title: Pure/ProofGeneral/proof_general_emacs.ML |
2 |
Author: David Aspinall and Markus Wenzel |
|
3 |
||
4 |
Isabelle/Isar configuration for Emacs Proof General. |
|
26549 | 5 |
See also http://proofgeneral.inf.ed.ac.uk |
21642 | 6 |
*) |
7 |
||
8 |
signature PROOF_GENERAL = |
|
9 |
sig |
|
26549 | 10 |
val test_markupN: string |
21642 | 11 |
val init: bool -> unit |
37977
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
12 |
structure ThyLoad: sig val add_path: string -> unit end |
21642 | 13 |
end; |
14 |
||
15 |
structure ProofGeneral: PROOF_GENERAL = |
|
16 |
struct |
|
17 |
||
21945 | 18 |
|
21642 | 19 |
(* print modes *) |
20 |
||
21 |
val thm_depsN = "thm_deps"; (*meta-information about theorem deps*) |
|
26549 | 22 |
val test_markupN = "test_markup"; (*XML markup for everything*) |
23 |
||
43777 | 24 |
fun special ch = chr 1 ^ ch; |
21642 | 25 |
|
26 |
||
29326 | 27 |
(* render markup *) |
21642 | 28 |
|
29 |
local |
|
30 |
||
29326 | 31 |
fun render_trees ts = fold render_tree ts |
49658 | 32 |
|
33 |
and render_tree t = |
|
34 |
(case XML.unwrap_elem t of |
|
35 |
SOME (_, ts) => render_trees ts |
|
36 |
| NONE => |
|
37 |
(case t of |
|
38 |
XML.Text s => Buffer.add s |
|
39 |
| XML.Elem ((name, props), ts) => |
|
40 |
let |
|
41 |
val (bg1, en1) = |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
42 |
if name <> Markup.promptN andalso print_mode_active test_markupN |
49658 | 43 |
then XML.output_markup (name, props) |
44 |
else Markup.no_output; |
|
45 |
val (bg2, en2) = |
|
46 |
if null ts then Markup.no_output |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
47 |
else if name = Markup.stateN then (special "O" ^ "\n", "\n" ^ special "P") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
48 |
else if name = Markup.sendbackN then (special "W", special "X") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
49 |
else if name = Markup.intensifyN then (special "0", special "1") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
50 |
else if name = Markup.tfreeN then (special "C", special "A") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
51 |
else if name = Markup.tvarN then (special "D", special "A") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
52 |
else if name = Markup.freeN then (special "E", special "A") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
53 |
else if name = Markup.boundN then (special "F", special "A") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
54 |
else if name = Markup.varN then (special "G", special "A") |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
55 |
else if name = Markup.skolemN then (special "H", special "A") |
49658 | 56 |
else |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
57 |
(case Markup.get_entity_kind (name, props) of |
49658 | 58 |
SOME kind => |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
50163
diff
changeset
|
59 |
if kind = Markup.classN then (special "B", special "A") |
49658 | 60 |
else Markup.no_output |
61 |
| NONE => Markup.no_output); |
|
62 |
in |
|
63 |
Buffer.add bg1 #> |
|
64 |
Buffer.add bg2 #> |
|
65 |
render_trees ts #> |
|
66 |
Buffer.add en2 #> |
|
67 |
Buffer.add en1 |
|
68 |
end)); |
|
21642 | 69 |
|
70 |
in |
|
71 |
||
29326 | 72 |
fun render text = |
73 |
Buffer.content (render_trees (YXML.parse_body text) Buffer.empty); |
|
21642 | 74 |
|
75 |
end; |
|
76 |
||
77 |
||
29326 | 78 |
(* messages *) |
79 |
||
80 |
fun message bg en prfx text = |
|
81 |
(case render text of |
|
82 |
"" => () |
|
44389
a3b5fdfb04a3
tuned signature -- contrast physical output primitives versus Output.raw_message;
wenzelm
parents:
44270
diff
changeset
|
83 |
| s => Output.physical_writeln (enclose bg en (prefix_lines prfx s))); |
23641
d6f9d3acffaa
toplevel prompt/print_state: proper markup, removed hooks;
wenzelm
parents:
23621
diff
changeset
|
84 |
|
29326 | 85 |
fun setup_messages () = |
40133
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
86 |
(Output.Private_Hooks.writeln_fn := message "" "" ""; |
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
87 |
Output.Private_Hooks.status_fn := (fn _ => ()); |
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
88 |
Output.Private_Hooks.report_fn := (fn _ => ()); |
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
89 |
Output.Private_Hooks.urgent_message_fn := message (special "I") (special "J") ""; |
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
90 |
Output.Private_Hooks.tracing_fn := message (special "I" ^ special "V") (special "J") ""; |
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
91 |
Output.Private_Hooks.warning_fn := message (special "K") (special "L") "### "; |
44270
3eaad39e520c
more careful treatment of exception serial numbers, with propagation to message channel;
wenzelm
parents:
43840
diff
changeset
|
92 |
Output.Private_Hooks.error_fn := (fn (_, s) => message (special "M") (special "N") "*** " s); |
44389
a3b5fdfb04a3
tuned signature -- contrast physical output primitives versus Output.raw_message;
wenzelm
parents:
44270
diff
changeset
|
93 |
Output.Private_Hooks.prompt_fn := (fn s => Output.physical_stdout (render s ^ special "S"))); |
29326 | 94 |
|
95 |
fun panic s = |
|
96 |
(message (special "M") (special "N") "!!! " ("## SYSTEM EXIT ##\n" ^ s); exit 1); |
|
23641
d6f9d3acffaa
toplevel prompt/print_state: proper markup, removed hooks;
wenzelm
parents:
23621
diff
changeset
|
97 |
|
d6f9d3acffaa
toplevel prompt/print_state: proper markup, removed hooks;
wenzelm
parents:
23621
diff
changeset
|
98 |
|
29326 | 99 |
(* notification *) |
21642 | 100 |
|
29326 | 101 |
val emacs_notify = message (special "I") (special "J") ""; |
21642 | 102 |
|
103 |
fun tell_clear_goals () = |
|
21940 | 104 |
emacs_notify "Proof General, please clear the goals buffer."; |
21642 | 105 |
|
106 |
fun tell_clear_response () = |
|
21940 | 107 |
emacs_notify "Proof General, please clear the response buffer."; |
21642 | 108 |
|
109 |
fun tell_file_loaded path = |
|
21940 | 110 |
emacs_notify ("Proof General, this file is loaded: " ^ quote (File.platform_path path)); |
21642 | 111 |
|
112 |
fun tell_file_retracted path = |
|
21940 | 113 |
emacs_notify ("Proof General, you can unlock the file " ^ quote (File.platform_path path)); |
21642 | 114 |
|
115 |
||
116 |
(* theory loader actions *) |
|
117 |
||
118 |
local |
|
119 |
||
120 |
fun trace_action action name = |
|
37216
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
36953
diff
changeset
|
121 |
if action = Thy_Info.Update then |
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
36953
diff
changeset
|
122 |
List.app tell_file_loaded (Thy_Info.loaded_files name) |
37981
9a15982f41fe
theory loader: removed obsolete touch/outdate operations (require_thy no longer changes the database implicitly);
wenzelm
parents:
37977
diff
changeset
|
123 |
else if action = Thy_Info.Remove then |
37216
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
36953
diff
changeset
|
124 |
List.app tell_file_retracted (Thy_Info.loaded_files name) |
21642 | 125 |
else (); |
126 |
||
127 |
in |
|
37216
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
36953
diff
changeset
|
128 |
fun setup_thy_loader () = Thy_Info.add_hook trace_action; |
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
36953
diff
changeset
|
129 |
fun sync_thy_loader () = List.app (trace_action Thy_Info.Update) (Thy_Info.get_names ()); |
21642 | 130 |
end; |
131 |
||
132 |
||
21948 | 133 |
(* get informed about files *) |
21642 | 134 |
|
25442 | 135 |
(*liberal low-level version*) |
136 |
val thy_name = perhaps (try (unsuffix ".thy")) o List.last o space_explode "/"; |
|
137 |
||
37977
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
138 |
val inform_file_retracted = Thy_Info.kill_thy o thy_name; |
25442 | 139 |
|
27577
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
140 |
fun inform_file_processed file = |
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
141 |
let |
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
142 |
val name = thy_name file; |
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
143 |
val _ = name = "" andalso error ("Bad file name: " ^ quote file); |
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
144 |
val _ = |
37977
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
145 |
Thy_Info.register_thy (Toplevel.end_theory Position.none (Isar.state ())) |
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
146 |
handle ERROR msg => |
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
147 |
(warning (cat_lines ["Failed to register theory: " ^ quote name, msg]); |
46737 | 148 |
tell_file_retracted (Thy_Load.thy_path (Path.basic name))) |
29349 | 149 |
val _ = Isar.init (); |
27577
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
150 |
in () end; |
21642 | 151 |
|
152 |
||
153 |
(* restart top-level loop (keeps most state information) *) |
|
154 |
||
40132
7ee65dbffa31
renamed Output.priority to Output.urgent_message to emphasize its special role more clearly;
wenzelm
parents:
39733
diff
changeset
|
155 |
val welcome = Output.urgent_message o Session.welcome; |
21642 | 156 |
|
157 |
fun restart () = |
|
21940 | 158 |
(sync_thy_loader (); |
159 |
tell_clear_goals (); |
|
160 |
tell_clear_response (); |
|
29349 | 161 |
Isar.init (); |
27577
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
162 |
welcome ()); |
21642 | 163 |
|
164 |
||
165 |
(* theorem dependency output *) |
|
166 |
||
167 |
local |
|
168 |
||
169 |
val spaces_quote = space_implode " " o map quote; |
|
170 |
||
171 |
fun thm_deps_message (thms, deps) = |
|
21948 | 172 |
emacs_notify ("Proof General, theorem dependencies of " ^ thms ^ " are " ^ deps); |
21642 | 173 |
|
28096
046418f64474
theorem dependency output: Toplevel.add_hook, ProofGeneralPgip.new_thms_deps;
wenzelm
parents:
28020
diff
changeset
|
174 |
in |
046418f64474
theorem dependency output: Toplevel.add_hook, ProofGeneralPgip.new_thms_deps;
wenzelm
parents:
28020
diff
changeset
|
175 |
|
28103
b79e61861f0f
simplified Toplevel.add_hook: cover successful transactions only;
wenzelm
parents:
28100
diff
changeset
|
176 |
fun setup_present_hook () = Toplevel.add_hook (fn _ => fn state => fn state' => |
28106 | 177 |
if print_mode_active thm_depsN andalso |
178 |
can Toplevel.theory_of state andalso Toplevel.is_theory state' |
|
179 |
then |
|
28100
7650d5e0f8fb
refined theorem dependency output: previous state needs to contain a theory (not empty toplevel);
wenzelm
parents:
28096
diff
changeset
|
180 |
let val (names, deps) = |
7650d5e0f8fb
refined theorem dependency output: previous state needs to contain a theory (not empty toplevel);
wenzelm
parents:
28096
diff
changeset
|
181 |
ProofGeneralPgip.new_thms_deps (Toplevel.theory_of state) (Toplevel.theory_of state') |
7650d5e0f8fb
refined theorem dependency output: previous state needs to contain a theory (not empty toplevel);
wenzelm
parents:
28096
diff
changeset
|
182 |
in |
21968 | 183 |
if null names orelse null deps then () |
184 |
else thm_deps_message (spaces_quote names, spaces_quote deps) |
|
185 |
end |
|
28096
046418f64474
theorem dependency output: Toplevel.add_hook, ProofGeneralPgip.new_thms_deps;
wenzelm
parents:
28020
diff
changeset
|
186 |
else ()); |
21642 | 187 |
|
188 |
end; |
|
189 |
||
190 |
||
191 |
(* additional outer syntax for Isar *) |
|
192 |
||
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
193 |
val _ = |
48646
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
194 |
Outer_Syntax.improper_command |
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
195 |
(("ProofGeneral.pr", Keyword.diag), Position.none) "print state (internal)" |
33872 | 196 |
(Scan.succeed (Toplevel.no_timing o Toplevel.keep (fn state => |
197 |
if Toplevel.is_toplevel state orelse Toplevel.is_theory state then tell_clear_goals () |
|
198 |
else (Toplevel.quiet := false; Toplevel.print_state true state)))); |
|
199 |
||
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
200 |
val _ = (*undo without output -- historical*) |
48646
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
201 |
Outer_Syntax.improper_command |
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
202 |
(("ProofGeneral.undo", Keyword.control), Position.none) "(internal)" |
27535 | 203 |
(Scan.succeed (Toplevel.no_timing o Toplevel.imperative (fn () => Isar.undo 1))); |
21642 | 204 |
|
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
205 |
val _ = |
48646
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
206 |
Outer_Syntax.improper_command |
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
207 |
(("ProofGeneral.restart", Keyword.control), Position.none) "(internal)" |
36950 | 208 |
(Parse.opt_unit >> (Toplevel.no_timing oo K (Toplevel.imperative restart))); |
21642 | 209 |
|
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
210 |
val _ = |
48646
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
211 |
Outer_Syntax.improper_command |
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
212 |
(("ProofGeneral.kill_proof", Keyword.control), Position.none) "(internal)" |
27532 | 213 |
(Scan.succeed (Toplevel.no_timing o |
214 |
Toplevel.imperative (fn () => (Isar.kill_proof (); tell_clear_goals ())))); |
|
215 |
||
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
216 |
val _ = |
48646
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
217 |
Outer_Syntax.improper_command |
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
218 |
(("ProofGeneral.inform_file_processed", Keyword.control), Position.none) "(internal)" |
36950 | 219 |
(Parse.name >> (fn file => |
27577
7c7a9a343ca5
proper_inform_file_processed: new implementation based on global Isar state (cf. isar.ML);
wenzelm
parents:
27537
diff
changeset
|
220 |
Toplevel.no_timing o Toplevel.imperative (fn () => inform_file_processed file))); |
21642 | 221 |
|
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
222 |
val _ = |
48646
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
223 |
Outer_Syntax.improper_command |
91281e9472d8
more official command specifications, including source position;
wenzelm
parents:
46961
diff
changeset
|
224 |
(("ProofGeneral.inform_file_retracted", Keyword.control), Position.none) "(internal)" |
36950 | 225 |
(Parse.name >> (Toplevel.no_timing oo |
21642 | 226 |
(fn file => Toplevel.imperative (fn () => inform_file_retracted file)))); |
227 |
||
228 |
||
229 |
(* init *) |
|
230 |
||
32738 | 231 |
val initialized = Unsynchronized.ref false; |
21642 | 232 |
|
22699
938c1011ac94
removed unused Output.panic hook -- internal to PG wrapper;
wenzelm
parents:
22678
diff
changeset
|
233 |
fun init false = panic "No Proof General interface support for Isabelle/classic mode." |
21940 | 234 |
| init true = |
38798
89f273ab1d42
expanded some aliases from structure Unsynchronized;
wenzelm
parents:
38253
diff
changeset
|
235 |
(if ! initialized then () |
89f273ab1d42
expanded some aliases from structure Unsynchronized;
wenzelm
parents:
38253
diff
changeset
|
236 |
else |
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
237 |
(Output.add_mode Symbol.xsymbolsN Symbol.output Output.default_escape; |
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
238 |
Output.add_mode ProofGeneralPgip.proof_general_emacsN |
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
239 |
Output.default_output Output.default_escape; |
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
240 |
Markup.add_mode ProofGeneralPgip.proof_general_emacsN YXML.output_markup; |
38833
9ff5ce3580c1
eliminated obsolete Output.no_warnings, where no warnings were produced anyway;
wenzelm
parents:
38798
diff
changeset
|
241 |
setup_messages (); |
40133
b61d52de66f0
more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents:
40132
diff
changeset
|
242 |
ProofGeneralPgip.pgip_channel_emacs (! Output.Private_Hooks.urgent_message_fn); |
38833
9ff5ce3580c1
eliminated obsolete Output.no_warnings, where no warnings were produced anyway;
wenzelm
parents:
38798
diff
changeset
|
243 |
setup_thy_loader (); |
9ff5ce3580c1
eliminated obsolete Output.no_warnings, where no warnings were produced anyway;
wenzelm
parents:
38798
diff
changeset
|
244 |
setup_present_hook (); |
9ff5ce3580c1
eliminated obsolete Output.no_warnings, where no warnings were produced anyway;
wenzelm
parents:
38798
diff
changeset
|
245 |
initialized := true); |
38798
89f273ab1d42
expanded some aliases from structure Unsynchronized;
wenzelm
parents:
38253
diff
changeset
|
246 |
sync_thy_loader (); |
38837
b47ee8df7ab4
discontinued separate Pure-ProofGeneral keywords session -- protocol commands are already defined in Pure;
wenzelm
parents:
38833
diff
changeset
|
247 |
Unsynchronized.change print_mode (update (op =) ProofGeneralPgip.proof_general_emacsN); |
37239 | 248 |
Secure.PG_setup (); |
38253
3d4e521014f7
Isabelle_Process: separate input fifo for commands (still using the old tty protocol);
wenzelm
parents:
38236
diff
changeset
|
249 |
Isar.toplevel_loop TextIO.stdIn |
3d4e521014f7
Isabelle_Process: separate input fifo for commands (still using the old tty protocol);
wenzelm
parents:
38236
diff
changeset
|
250 |
{init = true, welcome = true, sync = true, secure = Secure.is_secure ()}); |
21642 | 251 |
|
37977
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
252 |
|
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
253 |
(* fake old ThyLoad -- with new semantics *) |
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
254 |
|
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
255 |
structure ThyLoad = |
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
256 |
struct |
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
257 |
val add_path = Thy_Load.set_master_path o Path.explode; |
21642 | 258 |
end; |
37977
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
259 |
|
3ceccd415145
simplified/clarified theory loader: more explicit task management, kill old versions at start, commit results only in the very end, non-optional master dependency, do not store text in deps;
wenzelm
parents:
37954
diff
changeset
|
260 |
end; |