add an option to hide the completion bar
This commit is contained in:
parent
725c6b0327
commit
8da5b260fa
|
@ -65,6 +65,7 @@ type syntax =
|
|||
| Camlp4r
|
||||
|
||||
let hide_reserved, get_hide_reserved, set_hide_reserved = make_variable true
|
||||
let show_box, get_show_box, set_show_box = make_variable true
|
||||
let syntax, get_syntax, set_syntax = make_variable Normal
|
||||
let phrase_terminator, get_phrase_terminator, set_phrase_terminator = make_variable ";;"
|
||||
let auto_run_lwt, get_auto_run_lwt, set_auto_run_lwt = make_variable true
|
||||
|
|
|
@ -47,6 +47,15 @@ val get_hide_reserved : unit -> bool
|
|||
val set_hide_reserved : bool -> unit
|
||||
(** Modifies {!hide_reserved}. *)
|
||||
|
||||
val show_box : bool signal
|
||||
(** If [true] (the default) the completion bar is displayed. *)
|
||||
|
||||
val get_show_box : unit -> bool
|
||||
(** Returns the value of {!show_box}. *)
|
||||
|
||||
val set_show_box : bool -> unit
|
||||
(** Modifies {!show_box}. *)
|
||||
|
||||
(** Syntax. *)
|
||||
type syntax =
|
||||
| Normal
|
||||
|
@ -211,7 +220,7 @@ exception Need_more
|
|||
(*val parse_use_file : (string -> bool -> ((Camlp4.PreCast.Syntax.Ast.str_item list * Camlp4.PreCast.Syntax.Loc.t option) Camlp4.PreCast.Syntax.Gram.Entry.t) result) ref*)
|
||||
val parse_use_file : (string -> bool -> Parsetree.toplevel_phrase list result) ref
|
||||
|
||||
val parse_use_file_default : string -> bool -> Parsetree.toplevel_phrase list result
|
||||
val parse_use_file_default : string -> bool -> Parsetree.toplevel_phrase list result
|
||||
(** The default parser for toplevel regions. It uses the standard
|
||||
ocaml parser. *)
|
||||
|
||||
|
@ -232,7 +241,7 @@ val parse_toplevel_phrase : (string -> bool -> Parsetree.toplevel_phrase result)
|
|||
Except for {!Need_more}, the function must not raise any
|
||||
exception. *)
|
||||
|
||||
val parse_toplevel_phrase_default : string -> bool -> Parsetree.toplevel_phrase result
|
||||
val parse_toplevel_phrase_default : string -> bool -> Parsetree.toplevel_phrase result
|
||||
(** The default parser for toplevel phrases. It uses the standard
|
||||
ocaml parser. *)
|
||||
|
||||
|
|
|
@ -179,6 +179,8 @@ class read_phrase ~term = object(self)
|
|||
in
|
||||
self#set_completion pos words
|
||||
|
||||
method show_box = UTop.get_show_box ()
|
||||
|
||||
initializer
|
||||
(* Set the source signal for the size of the terminal. *)
|
||||
UTop_private.set_size self#size;
|
||||
|
@ -790,7 +792,7 @@ module Emacs(M : sig end) = struct
|
|||
let input = read_data () in
|
||||
let result, warnings = parse_input_multi input in
|
||||
let typecheck phrase =
|
||||
match UTop.check_phrase phrase with
|
||||
match UTop.check_phrase phrase with
|
||||
| None -> None
|
||||
| Some (locs, msg) -> Some (convert_locs input locs, msg) (* FIXME *)
|
||||
in
|
||||
|
|
Loading…
Reference in New Issue