88 val plain_output = Library.std_output o suffix "\n"; |
88 val plain_output = Library.std_output o suffix "\n"; |
89 |
89 |
90 fun decorate_lines bg en "" = plain_output o enclose bg en |
90 fun decorate_lines bg en "" = plain_output o enclose bg en |
91 | decorate_lines bg en prfx = plain_output o enclose bg en o prefix_lines prfx; |
91 | decorate_lines bg en prfx = plain_output o enclose bg en o prefix_lines prfx; |
92 |
92 |
93 val message = decorate_lines (oct_char "360") (oct_char "361") ""; |
|
94 |
|
95 fun setup_messages () = |
93 fun setup_messages () = |
96 (warning_fn := (decorate_lines (oct_char "362") (oct_char "363") "### "); |
94 (priority_fn := decorate_lines (oct_char "360") (oct_char "361") ""; |
|
95 warning_fn := (decorate_lines (oct_char "362") (oct_char "363") "### "); |
97 error_fn := (decorate_lines (oct_char "364") (oct_char "365") "*** ")); |
96 error_fn := (decorate_lines (oct_char "364") (oct_char "365") "*** ")); |
98 |
97 |
99 |
98 |
100 (* notification *) |
99 (* notification *) |
101 |
100 |
102 fun tell_clear_goals () = message "Proof General, please clear the goals buffer."; |
101 fun tell_clear_goals () = priority "Proof General, please clear the goals buffer."; |
103 fun tell_clear_response () = message "Proof General, please clear the response buffer."; |
102 fun tell_clear_response () = priority "Proof General, please clear the response buffer."; |
104 fun tell_file msg path = message ("Proof General, " ^ msg ^ " " ^ quote (File.sysify_path path)); |
103 fun tell_file msg path = priority ("Proof General, " ^ msg ^ " " ^ quote (File.sysify_path path)); |
105 |
104 |
106 |
105 |
107 (* theory / proof state output *) |
106 (* theory / proof state output *) |
108 |
107 |
109 fun setup_state () = |
108 fun setup_state () = |
166 |
165 |
167 (* misc commands for ProofGeneral/isa *) |
166 (* misc commands for ProofGeneral/isa *) |
168 |
167 |
169 fun thms_containing cs = ThmDatabase.print_thms_containing (the_context ()) cs; |
168 fun thms_containing cs = ThmDatabase.print_thms_containing (the_context ()) cs; |
170 |
169 |
171 val welcome = message o Session.welcome; |
170 val welcome = priority o Session.welcome; |
172 val help = welcome; |
171 val help = welcome; |
173 val show_context = Context.the_context; |
172 val show_context = Context.the_context; |
174 |
173 |
175 fun kill_goal () = (Goals.reset_goals (); tell_clear_goals ()); |
174 fun kill_goal () = (Goals.reset_goals (); tell_clear_goals ()); |
176 |
175 |