From 5f8dc36fb2d65699233b9ac9a3ff9f93701a01cb Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Thu, 14 May 2015 12:49:41 +0200 Subject: The -list-tag options now prints the corresponding COQ_COLORS value. --- toplevel/coqtop.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'toplevel') diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 160e549af..af7169ad6 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -281,7 +281,16 @@ let print_style_tags () = in print_string opt in - List.iter iter tags; + let make (t, st) = match st with + | None -> None + | Some st -> + let tags = List.map string_of_int (Terminal.repr st) in + let t = String.concat "." (Ppstyle.repr t) in + Some (t ^ "=" ^ String.concat ";" tags) + in + let repr = List.map_filter make tags in + let () = Printf.printf "COQ_COLORS=\"%s\"\n" (String.concat ":" repr) in + let () = List.iter iter tags in flush_all () let error_missing_arg s = -- cgit v1.2.3