let build (v:Ed_sourceview.sourceview) args =
let file = v#file#filename in
let com =
try Hashtbl.find commands file
with Not_found -> default_build_command file
in
let on_ok com =
Hashtbl.replace commands file com;
Ed_mode_ocaml_rc.ocamlbuild_commands#set
(Hashtbl.fold
(fun f com acc -> (f,com)::acc) commands []);
run com
in
Ed_misc.input_string ~history
v#minibuffer
~title: "Command" (Ed_misc.to_utf8 com) on_ok