Skip to content

Commit

Permalink
Remove deprecated values
Browse files Browse the repository at this point in the history
Follow-up to ocaml-community#415: we remove these values.
  • Loading branch information
emillon committed Apr 17, 2023
1 parent c50173c commit f8fb791
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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)
-------------------

Expand Down
10 changes: 0 additions & 10 deletions src/lib/uTop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [| |])
19 changes: 0 additions & 19 deletions src/lib/uTop.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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]
7 changes: 3 additions & 4 deletions src/lib/uTop_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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" "";
Expand Down

0 comments on commit f8fb791

Please sign in to comment.