diff options
-rw-r--r-- | stdlib/format.ml | 6 | ||||
-rw-r--r-- | stdlib/format.mli | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/stdlib/format.ml b/stdlib/format.ml index 50958542a..35e03ebea 100644 --- a/stdlib/format.ml +++ b/stdlib/format.ml @@ -477,6 +477,8 @@ let pp_close_tag state () = let pp_set_print_tags state b = state.pp_print_tags <- b;; let pp_set_mark_tags state b = state.pp_mark_tags <- b;; +let pp_get_print_tags state () = state.pp_print_tags;; +let pp_get_mark_tags state () = state.pp_mark_tags;; let pp_get_formatter_tag_functions state () = {mark_open_tag = state.pp_mark_open_tag; @@ -821,8 +823,12 @@ and get_formatter_tag_functions = pp_get_formatter_tag_functions std_formatter and set_print_tags = pp_set_print_tags std_formatter +and get_print_tags = + pp_get_print_tags std_formatter and set_mark_tags = pp_set_mark_tags std_formatter +and get_mark_tags = + pp_get_mark_tags std_formatter ;; diff --git a/stdlib/format.mli b/stdlib/format.mli index 4600b43ab..2816fc812 100644 --- a/stdlib/format.mli +++ b/stdlib/format.mli @@ -303,6 +303,9 @@ val set_mark_tags : bool -> unit;; ``verbatim'' material or richer decorated output depending on the treatment of tags. Default behavior of the pretty printer is to print tags and markers of tags. *) +val get_print_tags : unit -> bool;; +val get_mark_tags : unit -> bool;; +(** Return the current status of tag printing and marking. *) (** {6 Ellipsis} *) @@ -471,6 +474,8 @@ val pp_set_tab : formatter -> unit -> unit;; val pp_print_tab : formatter -> unit -> unit;; val pp_set_print_tags : formatter -> bool -> unit;; val pp_set_mark_tags : formatter -> bool -> unit;; +val pp_get_print_tags : formatter -> unit -> bool;; +val pp_get_mark_tags : formatter -> unit -> bool;; val pp_set_margin : formatter -> int -> unit;; val pp_get_margin : formatter -> unit -> int;; val pp_set_max_indent : formatter -> int -> unit;; |