aboutsummaryrefslogtreecommitdiff
path: root/lib/pp.ml
diff options
context:
space:
mode:
authorPierre Corbineau2014-12-16 15:59:52 +0100
committerPierre Corbineau2014-12-16 16:01:25 +0100
commit8029f7555f9c6f201cc70b5ecc538b11a861f0aa (patch)
treec750b3ea7cafd5ec2176866bbd16208e5335978a /lib/pp.ml
parentd4f5bdd6f7304fac541bb5f4555ecdd6aa42699a (diff)
parentf88cce2698da000ab9054da31330db70997a41a4 (diff)
fix bug #2447 in congruence
Diffstat (limited to 'lib/pp.ml')
-rw-r--r--lib/pp.ml12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/pp.ml b/lib/pp.ml
index 44036ca996..fa21506b33 100644
--- a/lib/pp.ml
+++ b/lib/pp.ml
@@ -360,7 +360,7 @@ let pp_dirs ?pp_tag ft =
with reraise ->
let reraise = Backtrace.add_backtrace reraise in
let () = Format.pp_print_flush ft () in
- raise reraise
+ Exninfo.iraise reraise
@@ -370,10 +370,17 @@ let pp_dirs ?pp_tag ft =
let emacs_quote_start = String.make 1 (Char.chr 254)
let emacs_quote_end = String.make 1 (Char.chr 255)
+let emacs_quote_info_start = "<infomsg>"
+let emacs_quote_info_end = "</infomsg>"
+
let emacs_quote g =
if !print_emacs then str emacs_quote_start ++ hov 0 g ++ str emacs_quote_end
else hov 0 g
+let emacs_quote_info g =
+ if !print_emacs then str emacs_quote_info_start ++ hov 0 g ++ str emacs_quote_info_end
+ else hov 0 g
+
(* pretty printing functions WITHOUT FLUSH *)
let pp_with ?pp_tag ft strm =
@@ -434,10 +441,11 @@ let make_body info s =
let debugbody strm = hov 0 (str "Debug:" ++ spc () ++ strm)
let warnbody strm = make_body (str "Warning:") strm
let errorbody strm = make_body (str "Error:") strm
+let infobody strm = emacs_quote_info strm
let std_logger ~id:_ level msg = match level with
| Debug _ -> msgnl (debugbody msg)
-| Info -> msgnl (hov 0 msg)
+| Info -> msgnl (infobody (hov 0 msg))
| Notice -> msgnl msg
| Warning -> Flags.if_warn (fun () -> msgnl_with !err_ft (warnbody msg)) ()
| Error -> msgnl_with !err_ft (errorbody msg)