25 val preference_real: category -> real Unsynchronized.ref -> string -> string -> unit |
25 val preference_real: category -> real Unsynchronized.ref -> string -> string -> unit |
26 val preference_string: category -> string Unsynchronized.ref -> string -> string -> unit |
26 val preference_string: category -> string Unsynchronized.ref -> string -> string -> unit |
27 val preference_option: category -> string -> string -> string -> unit |
27 val preference_option: category -> string -> string -> string -> unit |
28 structure ThyLoad: sig val add_path: string -> unit end |
28 structure ThyLoad: sig val add_path: string -> unit end |
29 val thm_deps: bool Unsynchronized.ref |
29 val thm_deps: bool Unsynchronized.ref |
|
30 val proof_generalN: string |
30 val init: unit -> unit |
31 val init: unit -> unit |
31 end; |
32 end; |
32 |
33 |
33 structure ProofGeneral: PROOF_GENERAL = |
34 structure ProofGeneral: PROOF_GENERAL = |
34 struct |
35 struct |
391 val welcome = Output.urgent_message o Session.welcome; |
392 val welcome = Output.urgent_message o Session.welcome; |
392 |
393 |
393 |
394 |
394 (* init *) |
395 (* init *) |
395 |
396 |
396 val proof_general_emacsN = "ProofGeneralEmacs"; |
397 val proof_generalN = "ProofGeneral"; |
397 |
398 |
398 val initialized = Unsynchronized.ref false; |
399 val initialized = Unsynchronized.ref false; |
399 |
400 |
400 fun init () = |
401 fun init () = |
401 (if ! initialized then () |
402 (if ! initialized then () |
402 else |
403 else |
403 (Output.add_mode Symbol.xsymbolsN Symbol.output Output.default_escape; |
404 (Output.add_mode Symbol.xsymbolsN Symbol.output Output.default_escape; |
404 Output.add_mode proof_general_emacsN |
405 Output.add_mode proof_generalN Output.default_output Output.default_escape; |
405 Output.default_output Output.default_escape; |
406 Markup.add_mode proof_generalN YXML.output_markup; |
406 Markup.add_mode proof_general_emacsN YXML.output_markup; |
|
407 setup_messages (); |
407 setup_messages (); |
408 setup_thy_loader (); |
408 setup_thy_loader (); |
409 setup_present_hook (); |
409 setup_present_hook (); |
410 initialized := true); |
410 initialized := true); |
411 sync_thy_loader (); |
411 sync_thy_loader (); |
412 Unsynchronized.change print_mode (update (op =) proof_general_emacsN); |
412 Unsynchronized.change print_mode (update (op =) proof_generalN); |
413 Secure.PG_setup (); |
413 Secure.PG_setup (); |
414 welcome (); |
414 welcome (); |
415 Isar.toplevel_loop TextIO.stdIn |
415 Isar.toplevel_loop TextIO.stdIn |
416 {init = true, welcome = false, sync = true, secure = Secure.is_secure ()}); |
416 {init = true, welcome = false, sync = true, secure = Secure.is_secure ()}); |
417 |
417 |