summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJules Aguillon <juloo.dsi@gmail.com>2019-03-11 12:28:54 +0100
committerJules Aguillon <juloo.dsi@gmail.com>2019-03-11 13:27:48 +0100
commita241675676a742053c6e785f017889f253d060b3 (patch)
tree339bea70d317f1b0604781aed4bbcca78e1be5fb /tools
parentd926fdb9f884f921ade607707afd32dd36226347 (diff)
downloadocaml-a241675676a742053c6e785f017889f253d060b3.tar.gz
Fix tools/caml-tex printing of sub message locations
List printer fields explicitly to avoid the same problem from happening again
Diffstat (limited to 'tools')
-rw-r--r--tools/caml_tex.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/caml_tex.ml b/tools/caml_tex.ml
index 108a0f6665..8f1a531805 100644
--- a/tools/caml_tex.ml
+++ b/tools/caml_tex.ml
@@ -132,10 +132,12 @@ module Toplevel = struct
if startchar >= 0 then
locs := (startchar, endchar) :: !locs
- (** Record the main location instead of printing it *)
+ (** Record locations in the main error and suberrors without printing them *)
let printer_register_locs =
{ Location.batch_mode_printer with
- pp_main_loc = (fun _ _ _ loc -> register_loc loc) }
+ pp_main_loc = (fun _ _ _ loc -> register_loc loc);
+ pp_submsg_loc = (fun _ _ _ loc -> register_loc loc);
+ }
(** Capture warnings and keep them in a list *)
let warnings = ref []