Replace deprecated Lwt_sequence with LTerm_dlist
This commit is contained in:
parent
03b383bd58
commit
239e6aad95
|
@ -33,8 +33,8 @@ let stashable_session_history = UTop_history.create ()
|
||||||
| Hooks |
|
| Hooks |
|
||||||
+-----------------------------------------------------------------+ *)
|
+-----------------------------------------------------------------+ *)
|
||||||
|
|
||||||
let new_command_hooks = Lwt_sequence.create ()
|
let new_command_hooks = LTerm_dlist.create ()
|
||||||
let at_new_command f = ignore (Lwt_sequence.add_l f new_command_hooks)
|
let at_new_command f = ignore (LTerm_dlist.add_l f new_command_hooks)
|
||||||
|
|
||||||
(* +-----------------------------------------------------------------+
|
(* +-----------------------------------------------------------------+
|
||||||
| Config |
|
| Config |
|
||||||
|
@ -813,7 +813,7 @@ let load_path = Config.load_path
|
||||||
+-----------------------------------------------------------------+ *)
|
+-----------------------------------------------------------------+ *)
|
||||||
|
|
||||||
let smart_accept = ref true
|
let smart_accept = ref true
|
||||||
let new_prompt_hooks = Lwt_sequence.create ()
|
let new_prompt_hooks = LTerm_dlist.create ()
|
||||||
let at_new_prompt f = ignore (Lwt_sequence.add_l f new_prompt_hooks)
|
let at_new_prompt f = ignore (LTerm_dlist.add_l f new_prompt_hooks)
|
||||||
let prompt_continue = ref (S.const [| |])
|
let prompt_continue = ref (S.const [| |])
|
||||||
let prompt_comment = ref (S.const [| |])
|
let prompt_comment = ref (S.const [| |])
|
||||||
|
|
|
@ -264,7 +264,7 @@ val prompt : LTerm_text.t React.signal ref
|
||||||
|
|
||||||
(** {6 Hooks} *)
|
(** {6 Hooks} *)
|
||||||
|
|
||||||
val new_command_hooks : (unit -> unit) Lwt_sequence.t
|
val new_command_hooks : (unit -> unit) LTerm_dlist.t
|
||||||
(** Functions called before each new command. *)
|
(** Functions called before each new command. *)
|
||||||
|
|
||||||
val at_new_command : (unit -> unit) -> unit
|
val at_new_command : (unit -> unit) -> unit
|
||||||
|
@ -370,5 +370,5 @@ val load_path : string list ref
|
||||||
val prompt_continue : LTerm_text.t React.signal ref
|
val prompt_continue : LTerm_text.t React.signal ref
|
||||||
val prompt_comment : LTerm_text.t React.signal ref
|
val prompt_comment : LTerm_text.t React.signal ref
|
||||||
val smart_accept : bool ref
|
val smart_accept : bool ref
|
||||||
val new_prompt_hooks : (unit -> unit) Lwt_sequence.t
|
val new_prompt_hooks : (unit -> unit) LTerm_dlist.t
|
||||||
val at_new_prompt : (unit -> unit) -> unit
|
val at_new_prompt : (unit -> unit) -> unit
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
open CamomileLibraryDyn.Camomile
|
open CamomileLibraryDyn.Camomile
|
||||||
open Lwt_react
|
open Lwt_react
|
||||||
|
open LTerm_dlist
|
||||||
open LTerm_text
|
open LTerm_text
|
||||||
open LTerm_geom
|
open LTerm_geom
|
||||||
open UTop_token
|
open UTop_token
|
||||||
|
@ -628,7 +629,7 @@ let rec loop term =
|
||||||
UTop_private.set_count (S.value UTop_private.count + 1);
|
UTop_private.set_count (S.value UTop_private.count + 1);
|
||||||
|
|
||||||
(* Call hooks. *)
|
(* Call hooks. *)
|
||||||
Lwt_sequence.iter_l (fun f -> f ()) UTop.new_command_hooks;
|
LTerm_dlist.iter_l (fun f -> f ()) UTop.new_command_hooks;
|
||||||
|
|
||||||
(* Read interactively user input. *)
|
(* Read interactively user input. *)
|
||||||
let phrase_opt =
|
let phrase_opt =
|
||||||
|
@ -953,7 +954,7 @@ module Emacs(M : sig end) = struct
|
||||||
UTop_private.set_count (S.value UTop_private.count + 1);
|
UTop_private.set_count (S.value UTop_private.count + 1);
|
||||||
|
|
||||||
(* Call hooks. *)
|
(* Call hooks. *)
|
||||||
Lwt_sequence.iter_l (fun f -> f ()) UTop.new_command_hooks;
|
LTerm_dlist.iter_l (fun f -> f ()) UTop.new_command_hooks;
|
||||||
|
|
||||||
(* Tell emacs we are ready. *)
|
(* Tell emacs we are ready. *)
|
||||||
send "prompt" "";
|
send "prompt" "";
|
||||||
|
|
Loading…
Reference in New Issue