diff options
| author | Pierre Courtieu | 2014-12-16 14:13:59 +0100 |
|---|---|---|
| committer | Pierre Courtieu | 2014-12-16 14:13:59 +0100 |
| commit | 5ba84979df97996cd04f44e506742bb58ecf0465 (patch) | |
| tree | 565c966fd3f4f73a2182337933e147d73a4c6971 /lib/pp.ml | |
| parent | c816bdb44625b6dba8efa4b0ba39f162b06b737d (diff) | |
msg_info now puts infomsg tag in emacs mode.
Fixes the idtac "string" not appearing in proofgeneral because
printined *before* the goal.
Diffstat (limited to 'lib/pp.ml')
| -rw-r--r-- | lib/pp.ml | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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) |
