From 9736f255287a7207d00422b06de802d62b8304fe Mon Sep 17 00:00:00 2001 From: Jim Fehrle Date: Wed, 14 Nov 2018 18:35:50 -0800 Subject: Initialize styles so textual markers are used when color is not enabled --- toplevel/coqtop.ml | 5 +++-- vernac/topfmt.ml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 92ac200bc0..f2c24807b8 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -94,8 +94,9 @@ let init_color opts = | Some "" -> false (* No color output *) | Some s -> Topfmt.parse_color_config s; true (* Overwrite all colors *) end - else - false + else begin + Topfmt.default_styles (); false (** textual markers, no color *) + end in if Proof_diffs.show_diffs () && not term_color then (prerr_endline "Error: -diffs requires enabling -color"; exit 1); diff --git a/vernac/topfmt.ml b/vernac/topfmt.ml index ed93267665..60b0bdc7e7 100644 --- a/vernac/topfmt.ml +++ b/vernac/topfmt.ml @@ -196,8 +196,8 @@ let init_tag_map styles = let default_styles () = init_tag_map (default_tag_map ()) -let parse_color_config file = - let styles = Terminal.parse file in +let parse_color_config str = + let styles = Terminal.parse str in init_tag_map styles let dump_tags () = CString.Map.bindings !tag_map -- cgit v1.2.3