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 Jun 23, 2023
1 parent 351741b commit 94b41af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 31 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.1 (2023-04-21)
-------------------

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

0 comments on commit 94b41af

Please sign in to comment.