sig
  val get_att : string -> (string * string) list -> string option
  val get_att_f :
    ?default:'->
    (string -> 'a) -> string -> (string * string) list -> 'a option
  val languages_manager : GSourceView.source_languages_manager
  val lang_of_filename : string -> GSourceView.source_language option
  val utf8_of_filename : ?full:bool -> string -> string
  val location_of_string :
    string -> [> `Char of int | `Linechar of int * int ] option
  val string_of_location : int * int -> string
  val location_of_iter : GText.iter -> int * int
  val open_buffers_file : string Pervasives.ref
  val read_open_buffers_file :
    string -> (string * (string * string) list) list
  val write_open_buffers_file :
    string ->
    < attributes : (string * string) list; filename : string; .. > list ->
    unit
  val buffer_name_history : string list Pervasives.ref
  val remove_buffer_from_history : string -> unit
  val make_buffer_first_in_history : string -> unit
  val pastable_history : Ed_minibuffer.minibuffer_history
  class my_buffer :
    unit ->
    object
      val mutable cursor_moved_signal_ids : (int * GtkSignal.id) list
      val mutable delete_range_signal_ids : (int * GtkSignal.id) list
      val mutable insert_text_signal_ids : (int * GtkSignal.id) list
      val mutable modified_changed_signal_ids : (int * GtkSignal.id) list
      method add_selection_clipboard : GData.clipboard -> unit
      method apply_tag :
        GText.tag -> start:GText.iter -> stop:GText.iter -> unit
      method apply_tag_by_name :
        string -> start:GText.iter -> stop:GText.iter -> unit
      method as_buffer : Gtk.text_buffer
      method as_source_buffer : GtkSourceView_types.source_buffer Gtk.obj
      method begin_not_undoable_action : unit -> unit
      method begin_user_action : unit -> unit
      method bounds : GText.iter * GText.iter
      method can_redo : bool
      method can_undo : bool
      method char_count : int
      method check_brackets : bool
      method connect : GSourceView.source_buffer_signals
      method connect_cursor_moved : int -> (unit -> unit) -> unit
      method connect_delete_range :
        int -> (start:GText.iter -> stop:GText.iter -> unit) -> unit
      method connect_insert_text :
        int -> (GText.iter -> string -> unit) -> unit
      method connect_modified_changed : int -> (unit -> unit) -> unit
      method copy_clipboard : GData.clipboard -> unit
      method create_child_anchor : GText.iter -> GText.child_anchor
      method create_mark :
        ?name:string -> ?left_gravity:bool -> GText.iter -> Gtk.text_mark
      method create_marker :
        ?name:string ->
        ?typ:string -> GText.iter -> GSourceView.source_marker
      method create_tag :
        ?name:string -> GText.tag_property list -> GText.tag
      method cursor_position : int
      method cut_clipboard :
        ?default_editable:bool -> GData.clipboard -> unit
      method delete : start:GText.iter -> stop:GText.iter -> unit
      method delete_interactive :
        start:GText.iter ->
        stop:GText.iter -> ?default_editable:bool -> unit -> bool
      method delete_mark : GText.mark -> unit
      method delete_marker : GSourceView.source_marker -> unit
      method delete_selection :
        ?interactive:bool -> ?default_editable:bool -> unit -> bool
      method end_iter : GText.iter
      method end_not_undoable_action : unit -> unit
      method end_user_action : unit -> unit
      method escape_char : Glib.unichar
      method get_first_marker : GSourceView.source_marker option
      method get_iter : GText.position -> GText.iter
      method get_iter_at_byte : line:int -> int -> GText.iter
      method get_iter_at_char : ?line:int -> int -> GText.iter
      method get_iter_at_mark : GText.mark -> GText.iter
      method get_iter_at_marker : GSourceView.source_marker -> GText.iter
      method get_last_marker : GSourceView.source_marker option
      method get_mark : GText.mark -> Gtk.text_mark
      method get_marker : string -> GSourceView.source_marker
      method get_markers_in_region :
        start:GText.iter -> stop:GText.iter -> GSourceView.source_marker list
      method get_next_marker : GText.iter -> GSourceView.source_marker option
      method get_oid : int
      method get_prev_marker : GText.iter -> GSourceView.source_marker option
      method get_text :
        ?start:GText.iter ->
        ?stop:GText.iter -> ?slice:bool -> ?visible:bool -> unit -> string
      method has_selection : bool
      method highlight : bool
      method insert :
        ?iter:GText.iter ->
        ?tag_names:string list -> ?tags:GText.tag list -> string -> unit
      method insert_child_anchor : GText.iter -> GText.child_anchor -> unit
      method insert_interactive :
        ?iter:GText.iter -> ?default_editable:bool -> string -> bool
      method insert_pixbuf :
        iter:GText.iter -> pixbuf:GdkPixbuf.pixbuf -> unit
      method insert_range :
        iter:GText.iter -> start:GText.iter -> stop:GText.iter -> unit
      method insert_range_interactive :
        iter:GText.iter ->
        start:GText.iter ->
        stop:GText.iter -> ?default_editable:bool -> unit -> bool
      method language : GSourceView.source_language option
      method line_count : int
      method max_undo_levels : int
      method misc : GObj.gobject_ops
      method modified : bool
      method move_mark : GText.mark -> where:GText.iter -> unit
      method move_marker : GSourceView.source_marker -> GText.iter -> unit
      method paste_clipboard :
        ?iter:GText.iter -> ?default_editable:bool -> GData.clipboard -> unit
      method place_cursor : where:GText.iter -> unit
      method re_search :
        bool ->
        ?start:GText.iter ->
        ?stop:GText.iter -> Pcre.regexp -> (GText.iter * GText.iter) option
      method redo : unit -> unit
      method remove_all_tags : start:GText.iter -> stop:GText.iter -> unit
      method remove_cursor_moved : int -> unit
      method remove_delete_range : int -> unit
      method remove_insert_text : int -> unit
      method remove_modified_changed : int -> unit
      method remove_selection_clipboard : GData.clipboard -> unit
      method remove_tag :
        GText.tag -> start:GText.iter -> stop:GText.iter -> unit
      method remove_tag_by_name :
        string -> start:GText.iter -> stop:GText.iter -> unit
      method remove_view_callbacks : int -> unit
      method select_range : GText.iter -> GText.iter -> unit
      method selection_bounds : GText.iter * GText.iter
      method set_bracket_match_style : GSourceView.source_tag_style -> unit
      method set_check_brackets : bool -> unit
      method set_escape_char : Glib.unichar -> unit
      method set_highlight : bool -> unit
      method set_language : GSourceView.source_language -> unit
      method set_max_undo_levels : int -> unit
      method set_modified : bool -> unit
      method set_syntax_mode : GSourceView.source_language -> unit
      method set_text : string -> unit
      method source_tag_table : GSourceView.source_tag_table
      method start_iter : GText.iter
      method syntax_mode : GSourceView.source_language option
      method tag_table : Gtk.text_tag_table
      method undo : unit -> unit
    end
  class type mode =
    object
      method from_display : string -> string
      method key_bindings : (Okey.keyhit_state * string) list
      method menus : (string * GToolbox.menu_entry list) list
      method name : string
      method set_from_display : (string -> string) -> unit
      method set_to_display : (string -> string) -> unit
      method to_display : string -> string
    end
  class empty_mode : mode
  val register_mode : ?replace:bool -> Ed_sourceview.mode -> unit
  val get_mode : string -> Ed_sourceview.mode
  val available_mode_names : unit -> string list
  class buffered_file :
    ?attributes:(string * string) list ->
    ?loc:int * int ->
    name:string ->
    filename:string ->
    Ed_sourceview.my_buffer ->
    object
      val buffer : Ed_sourceview.my_buffer
      val mutable date : float option
      val mutable encoding : string option
      val mutable filename : string
      val mutable location : int * int
      val mutable mode : Ed_sourceview.mode option
      val mutable name : string
      method attributes : (string * string) list
      method buffer : Ed_sourceview.my_buffer
      method date : float option
      method encoding : string option
      method filename : string
      method load_file : string -> unit
      method location : int * int
      method mode : Ed_sourceview.mode option
      method mode_from_display : string -> string
      method mode_key_bindings : (Okey.keyhit_state * string) list
      method mode_menus : (string * GToolbox.menu_entry list) list
      method mode_name : string option
      method mode_to_display : string -> string
      method name : string
      method newer_file_exists : bool
      method of_utf8 : string -> string
      method set_date : float option -> unit
      method set_encoding : string option -> unit
      method set_filename : string -> unit
      method set_location : int * int -> unit
      method set_mode : Ed_sourceview.mode option -> unit
      method set_name : string -> unit
      method set_syntax_mode : GSourceView.source_language -> unit
      method syntax_mode : GSourceView.source_language option
      method to_utf8 : string -> string
      method update_date : unit
      method write_file : ?fail_if_newer:bool -> unit -> unit
    end
  class sourceview :
    ?attributes:(string * string) list ->
    Ed_view.topwin ->
    ('-> unit) ->
    ('-> 'b) ->
    (Ed_sourceview.buffered_file -> Ed_view.topwin -> Ed_view.gui_view) ->
    (string -> string -> unit) ->
    Ed_sourceview.buffered_file ->
    object ('a)
      val mutable file : Ed_sourceview.buffered_file
      val mutable label : string
      val mutable my_location : int * int
      val mutable on_destroy : unit -> unit
      val mutable on_focus_in : unit -> unit
      val mutable on_label_change : string -> unit
      method attributes : (string * string) list
      method backward_char : unit
      method backward_line : unit
      method backward_word : unit
      method beginning_of_line : unit
      method box : GObj.widget
      method buffer_modified : bool
      method buffer_name : string
      method close : unit
      method connect_buffer_events : unit
      method copy : (unit -> unit) option
      method current_line : int
      method cut : (unit -> unit) option
      method cut_to_selection :
        ?concat:[ `APPEND | `PREPEND ] ->
        start:GText.iter -> stop:GText.iter -> unit -> unit
      method delete_char : bool -> unit
      method destroy : unit
      method display_buffer_name : unit
      method display_encoding : unit
      method display_location : unit
      method display_mode : unit
      method display_modified : unit
      method display_state : unit
      method display_stx_mode : unit
      method do_save : unit
      method dup : Ed_view.topwin -> Ed_view.gui_view option
      method end_of_line : unit
      method file : Ed_sourceview.buffered_file
      method filename : string
      method forward_char : unit
      method forward_line : unit
      method forward_word : unit
      method goto_char : int -> unit
      method goto_line : int -> unit
      method grab_focus : unit
      method has_focus : bool
      method insert : string -> unit
      method key_bindings : (Okey.keyhit_state * string) list
      method kill_line : append:bool -> unit
      method kill_word : ?concat:[ `APPEND | `PREPEND ] -> bool -> unit
      method kind : string
      method label : string
      method private location_in_buffer : int * int
      method menus : (string * GToolbox.menu_entry list) list
      method minibuffer : Ed_minibuffer.minibuffer
      method my_set_label : unit
      method on_cursor_moved : unit
      method paste : (unit -> unit) option
      method place_cursor : ?scroll:bool -> GText.iter -> unit
      method redo : unit
      method reload : (unit -> unit) option
      method save : (unit -> unit) option
      method save_as : (unit -> unit) option
      method set_encoding : string option -> unit
      method set_file : ?focus_in:bool -> Ed_sourceview.buffered_file -> unit
      method set_label : string -> unit
      method set_location : int * int -> unit
      method set_mode : Ed_sourceview.mode option -> unit
      method set_my_location : int * int -> unit
      method set_on_destroy : (unit -> unit) -> unit
      method set_on_focus_in : (unit -> unit) -> unit
      method set_on_label_change : (string -> unit) -> unit
      method set_scroll_on_change : unit
      method set_syntax_mode : GSourceView.source_language -> unit
      method set_wrap_mode : Gtk.Tags.wrap_mode -> unit
      method source_buffer : Ed_sourceview.my_buffer
      method source_view : GSourceView.source_view
      method switch_line_markers : ?v:bool -> unit -> unit
      method switch_line_numbers : ?v:bool -> unit -> unit
      method transpose_chars : unit
      method transpose_lines : unit
      method transpose_words : unit
      method undo : unit
      method unset_scroll_on_change : unit
      method update_my_location : unit
      method private write_file : unit
    end
  val mode_name_of_filename : string -> string option
  val mode_of_filename : string -> Ed_sourceview.mode option
  val views : Ed_sourceview.sourceview list Pervasives.ref
  val buffers : Ed_sourceview.buffered_file list Pervasives.ref
  val active_sourceview : Ed_sourceview.sourceview option Pervasives.ref
  val set_active_sourceview : Ed_sourceview.sourceview -> unit
  val get_fresh_buffer_name : string -> string
  val create_buffer :
    ?attributes:(string * string) list ->
    string -> Ed_sourceview.buffered_file
  val get_buffer :
    ?attributes:(string * string) list ->
    string -> Ed_sourceview.buffered_file
  val get_buffer_by_name : string -> Ed_sourceview.buffered_file
  val remove_buffer : < filename : string; name : string; .. > -> unit
  val on_view_destroy : Ed_sourceview.sourceview -> unit
  val create_view :
    ?attributes:(string * string) list ->
    Ed_view.topwin -> Ed_sourceview.buffered_file -> Ed_sourceview.sourceview
  val dup : Ed_sourceview.buffered_file -> Ed_view.topwin -> Ed_view.gui_view
  val file_rename : string -> string -> unit
  val open_file :
    Ed_view.topwin ->
    Ed_view.gui_view ->
    ?attributes:(string * string) list ->
    string ->
    [> `New_view of Ed_view.gui_view | `Use_view of Ed_view.gui_view ]
  class factory : Ed_view.view_factory
  val register_com :
    prefix:string ->
    string ->
    string array ->
    ?more:string ->
    (Ed_sourceview.sourceview -> string array -> unit) -> unit
  val switch_to_buffer : Ed_sourceview.sourceview -> string -> unit
  val candidate_buffers : unit -> string list
  val switch_buffer_history : Ed_minibuffer.minibuffer_history
  val switch_buffer : Ed_sourceview.sourceview -> string array -> unit
  val destroy_buffer : Ed_sourceview.sourceview -> '-> unit
  val prev_search : string option Pervasives.ref
  type search_buffer_function =
      ?wrapped:bool ->
      bool ->
      Ed_sourceview.my_buffer ->
      ?start:GText.iter -> string -> bool * (GText.iter * GText.iter) option
  val search_buffer : Ed_sourceview.search_buffer_function
  val re_search_buffer : Ed_sourceview.search_buffer_function
  val search :
    Ed_sourceview.search_buffer_function ->
    string ->
    ?changed:bool -> bool -> Ed_sourceview.sourceview -> string array -> unit
  val replace_history : Ed_minibuffer.minibuffer_history
  val query_replace_gen :
    ?mes:string ->
    string ->
    Ed_sourceview.search_buffer_function ->
    (searched:string -> found:string -> repl:string -> string) ->
    Ed_sourceview.sourceview -> string array -> unit
  val query_replace : Ed_sourceview.sourceview -> string array -> unit
  val re_query_replace : Ed_sourceview.sourceview -> string array -> unit
  val paste : Ed_sourceview.sourceview -> string array -> unit
  val copy : Ed_sourceview.sourceview -> string array -> unit
  val cut : Ed_sourceview.sourceview -> string array -> unit
  val beginning_of_line : Ed_sourceview.sourceview -> string array -> unit
  val end_of_line : Ed_sourceview.sourceview -> string array -> unit
  val undo : Ed_sourceview.sourceview -> string array -> unit
  val redo : Ed_sourceview.sourceview -> string array -> unit
  val forward_word : Ed_sourceview.sourceview -> string array -> unit
  val backward_word : Ed_sourceview.sourceview -> string array -> unit
  val forward_line : Ed_sourceview.sourceview -> string array -> unit
  val backward_line : Ed_sourceview.sourceview -> string array -> unit
  val forward_char : Ed_sourceview.sourceview -> string array -> unit
  val backward_char : Ed_sourceview.sourceview -> string array -> unit
  val kill_line : Ed_sourceview.sourceview -> string array -> unit
  val kill_word : Ed_sourceview.sourceview -> string array -> unit
  val backward_kill_word : Ed_sourceview.sourceview -> string array -> unit
  val delete_char : Ed_sourceview.sourceview -> string array -> unit
  val backward_delete_char : Ed_sourceview.sourceview -> string array -> unit
  val transpose_chars : Ed_sourceview.sourceview -> string array -> unit
  val transpose_lines : Ed_sourceview.sourceview -> string array -> unit
  val transpose_words : Ed_sourceview.sourceview -> string array -> unit
  val yank_choose : Ed_sourceview.sourceview -> string array -> unit
  val insert : Ed_sourceview.sourceview -> string array -> unit
  val goto_history : Ed_minibuffer.minibuffer_history
  val goto_line : Ed_sourceview.sourceview -> string array -> unit
  val goto_char : Ed_sourceview.sourceview -> string array -> unit
  val force_save : Ed_sourceview.sourceview -> string array -> unit
  val syntax_mode_history : Ed_minibuffer.minibuffer_history
  val set_syntax_mode : Ed_sourceview.sourceview -> string array -> unit
  val popup_syntax_mode_choice :
    Ed_sourceview.sourceview -> string array -> unit
  val mode_history : Ed_minibuffer.minibuffer_history
  val set_encoding : Ed_sourceview.sourceview -> string array -> unit
  val set_mode : Ed_sourceview.sourceview -> string array -> unit
  val popup_mode_choice : Ed_sourceview.sourceview -> string array -> unit
  val switch_line_numbers : Ed_sourceview.sourceview -> string array -> unit
  val switch_line_markers : Ed_sourceview.sourceview -> string array -> unit
  val set_wrap_mode : Ed_sourceview.sourceview -> string array -> unit
end