diff --git a/CHANGES.md b/CHANGES.md index 1f45817..557066c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +2.12.0 (unreleased) +------------------- + +* Mark `prompt_continue`, `prompt_comment`, `smart_accept`, `new_prompt_hooks`, + `at_new_prompt` as deprecated (they have been documented as such since 2012 + and most of them are ignored) (#xxx @emillon) + 2.11.0 (2023-01-05) ------------------- diff --git a/src/lib/uTop.mli b/src/lib/uTop.mli index ca68c13..3a86cbe 100644 --- a/src/lib/uTop.mli +++ b/src/lib/uTop.mli @@ -352,7 +352,16 @@ val set_load_path : string list -> unit (* These variables are not used and deprecated: *) val prompt_continue : LTerm_text.t React.signal ref +[@@deprecated] + val prompt_comment : LTerm_text.t React.signal ref +[@@deprecated] + val smart_accept : bool ref +[@@deprecated] + val new_prompt_hooks : (unit -> unit) LTerm_dlist.t +[@@deprecated] + val at_new_prompt : (unit -> unit) -> unit +[@@deprecated] diff --git a/src/lib/uTop_main.ml b/src/lib/uTop_main.ml index be96f94..4352d3e 100644 --- a/src/lib/uTop_main.ml +++ b/src/lib/uTop_main.ml @@ -230,7 +230,7 @@ class read_phrase ~term = object(self) let input_utf8= Zed_string.to_utf8 input in (* Toploop does that: *) Location.reset (); - let eos_is_error = not !UTop.smart_accept in + let eos_is_error = not !(UTop.smart_accept[@alert "-deprecated"]) in try let result = parse_and_check input_utf8 eos_is_error in return_value <- Some result;