From f8fb791116e064a2ad3011f7eb2a3f9be056dcb9 Mon Sep 17 00:00:00 2001 From: Etienne Millon Date: Mon, 17 Apr 2023 15:50:52 +0200 Subject: [PATCH] Remove deprecated values Follow-up to #415: we remove these values. --- CHANGES.md | 6 ++++++ src/lib/uTop.ml | 10 ---------- src/lib/uTop.mli | 19 ------------------- src/lib/uTop_main.ml | 7 +++---- 4 files changed, 9 insertions(+), 33 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c3f237e4..07843cb7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +2.13.0 (unreleased) +------------------- + +* Remove deprecated values `prompt_continue`, `prompt_comment`, `smart_accept`, + `new_prompt_hooks`, `at_new_prompt` (#..., @emillon) + 2.12.0 (2023-04-17) ------------------- diff --git a/src/lib/uTop.ml b/src/lib/uTop.ml index 9062d49e..51444f7a 100644 --- a/src/lib/uTop.ml +++ b/src/lib/uTop.ml @@ -832,13 +832,3 @@ let () = let get_load_path () = Load_path.get_paths () let set_load_path = UTop_compat.set_load_path - -(* +-----------------------------------------------------------------+ - | Deprecated | - +-----------------------------------------------------------------+ *) - -let smart_accept = ref true -let new_prompt_hooks = LTerm_dlist.create () -let at_new_prompt f = ignore (LTerm_dlist.add_l f new_prompt_hooks) -let prompt_continue = ref (S.const [| |]) -let prompt_comment = ref (S.const [| |]) diff --git a/src/lib/uTop.mli b/src/lib/uTop.mli index 3a86cbe4..5a11b861 100644 --- a/src/lib/uTop.mli +++ b/src/lib/uTop.mli @@ -346,22 +346,3 @@ val set_load_path : string list -> unit The internal variable contains the list of directories added by findlib-required packages and [#directory] directives. *) - -(**/**) - -(* 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 6af15274..79b36370 100644 --- a/src/lib/uTop_main.ml +++ b/src/lib/uTop_main.ml @@ -141,7 +141,7 @@ let parse_input_multi input = in (result, Buffer.contents buf) -let parse_and_check input eos_is_error = +let parse_and_check input ~eos_is_error = let buf = Buffer.create 32 in let result = UTop.collect_formatters buf [Format.err_formatter] @@ -217,9 +217,8 @@ 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[@alert "-deprecated"]) in try - let result = parse_and_check input_utf8 eos_is_error in + let result = parse_and_check input_utf8 ~eos_is_error:false in return_value <- Some result; LTerm_history.add UTop.history input; let out, warnings = result in @@ -1031,7 +1030,7 @@ module Emacs(M : sig end) = struct let process_input add_to_history eos_is_error = let input = read_data () in let input_zed= Zed_string.unsafe_of_utf8 input in - let result, warnings = parse_and_check input eos_is_error in + let result, warnings = parse_and_check input ~eos_is_error in match result with | UTop.Value phrase -> send "accept" "";