aboutsummaryrefslogtreecommitdiff
path: root/vernac/topfmt.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2018-12-06 04:44:27 +0100
committerEmilio Jesus Gallego Arias2018-12-09 02:54:02 +0100
commitd00472c59d15259b486868c5ccdb50b6e602a548 (patch)
tree008d862e4308ac8ed94cfbcd94ac26c739b89642 /vernac/topfmt.ml
parentfa20a54d9fbe0f3872614a592fcef7ef56b05e49 (diff)
[doc] Enable Warning 50 [incorrect doc comment] and fix comments.
This is a pre-requisite to use automated formatting tools such as `ocamlformat`, also, there were quite a few places where the comments had basically no effect, thus it was confusing for the developer. p.s: Reading some comments was a lot of fun :)
Diffstat (limited to 'vernac/topfmt.ml')
-rw-r--r--vernac/topfmt.ml15
1 files changed, 8 insertions, 7 deletions
diff --git a/vernac/topfmt.ml b/vernac/topfmt.ml
index 4bf76dae51..4065bb9c1f 100644
--- a/vernac/topfmt.ml
+++ b/vernac/topfmt.ml
@@ -222,20 +222,21 @@ let diff_tag_stack = ref [] (* global, just like std_ft *)
(** Not thread-safe. We should put a lock somewhere if we print from
different threads. Do we? *)
let make_style_stack () =
- (** Default tag is to reset everything *)
+ (* Default tag is to reset everything *)
let style_stack = ref [] in
let peek () = match !style_stack with
- | [] -> default_style (** Anomalous case, but for robustness *)
+ | [] -> default_style (* Anomalous case, but for robustness *)
| st :: _ -> st
in
let open_tag tag =
let (tpfx, ttag) = split_tag tag in
if tpfx = end_pfx then "" else
let style = get_style ttag in
- (** Merge the current settings and the style being pushed. This allows
- restoring the previous settings correctly in a pop when both set the same
- attribute. Example: current settings have red FG, the pushed style has
- green FG. When popping the style, we should set red FG, not default FG. *)
+ (* Merge the current settings and the style being pushed. This
+ allows restoring the previous settings correctly in a pop
+ when both set the same attribute. Example: current settings
+ have red FG, the pushed style has green FG. When popping the
+ style, we should set red FG, not default FG. *)
let style = Terminal.merge (peek ()) style in
let diff = Terminal.diff (peek ()) style in
style_stack := style :: !style_stack;
@@ -247,7 +248,7 @@ let make_style_stack () =
if tpfx = start_pfx then "" else begin
if tpfx = end_pfx then diff_tag_stack := (try List.tl !diff_tag_stack with tl -> []);
match !style_stack with
- | [] -> (** Something went wrong, we fallback *)
+ | [] -> (* Something went wrong, we fallback *)
Terminal.eval default_style
| cur :: rem -> style_stack := rem;
if cur = (peek ()) then "" else