Remove deprecated values (#427)

Follow-up to #415: we remove these values.
This commit is contained in:
Etienne Millon 2023-06-23 17:16:36 +02:00 committed by GitHub
parent 351741b820
commit 4e6aae168c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 31 deletions

View File

@ -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.1 (2023-04-21)
-------------------

View File

@ -836,16 +836,6 @@ 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 [| |])
module Private = struct
let fix_string str =
let len = String.length str in

View File

@ -349,23 +349,6 @@ 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]
module Private : sig
val fix_string : string -> string
end

View File

@ -142,7 +142,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]
@ -218,9 +218,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
@ -1006,7 +1005,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" "";