aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--toplevel/coqtop.ml2
-rw-r--r--vernac/topfmt.ml5
-rw-r--r--vernac/topfmt.mli2
3 files changed, 4 insertions, 5 deletions
diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml
index 341888d09..cd831c05c 100644
--- a/toplevel/coqtop.ml
+++ b/toplevel/coqtop.ml
@@ -344,13 +344,13 @@ let init_color color_mode =
match colors with
| None ->
(** Default colors *)
+ Topfmt.default_styles ();
Topfmt.init_terminal_output ~color:true
| Some "" ->
(** No color output *)
Topfmt.init_terminal_output ~color:false
| Some s ->
(** Overwrite all colors *)
- Topfmt.clear_styles ();
Topfmt.parse_color_config s;
Topfmt.init_terminal_output ~color:true
end
diff --git a/vernac/topfmt.ml b/vernac/topfmt.ml
index 4e4077f42..055f6676e 100644
--- a/vernac/topfmt.ml
+++ b/vernac/topfmt.ml
@@ -187,8 +187,8 @@ let init_tag_map styles =
let set accu (name, st) = CString.Map.add name st accu in
tag_map := List.fold_left set !tag_map styles
-let clear_styles () =
- tag_map := CString.Map.empty
+let default_styles () =
+ init_tag_map (default_tag_map ())
let parse_color_config file =
let styles = Terminal.parse file in
@@ -257,7 +257,6 @@ let make_printing_functions () =
print_prefix, print_suffix
let init_terminal_output ~color =
- init_tag_map (default_tag_map ());
let push_tag, pop_tag, clear_tag = make_style_stack () in
let print_prefix, print_suffix = make_printing_functions () in
let tag_handler ft = {
diff --git a/vernac/topfmt.mli b/vernac/topfmt.mli
index 2fdefc6fc..579b456a2 100644
--- a/vernac/topfmt.mli
+++ b/vernac/topfmt.mli
@@ -43,7 +43,7 @@ val std_logger : ?pre_hdr:Pp.t -> Feedback.level -> Pp.t -> unit
val emacs_logger : ?pre_hdr:Pp.t -> Feedback.level -> Pp.t -> unit
(** Color output *)
-val clear_styles : unit -> unit
+val default_styles : unit -> unit
val parse_color_config : string -> unit
val dump_tags : unit -> (string * Terminal.style) list