diff options
Diffstat (limited to 'otherlibs/labltk/browser/viewer.ml')
-rw-r--r-- | otherlibs/labltk/browser/viewer.ml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/otherlibs/labltk/browser/viewer.ml b/otherlibs/labltk/browser/viewer.ml index 9af6f76d2..9a20a4996 100644 --- a/otherlibs/labltk/browser/viewer.ml +++ b/otherlibs/labltk/browser/viewer.ml @@ -21,7 +21,7 @@ let list_modules :path = String.capitalize (Filename.chop_suffix x suff:".cmi") end in List.fold_left l :acc - fun:(fun :acc item -> if List.mem acc :item then acc else item :: acc) + fun:(fun :acc key -> if List.mem acc :key then acc else key :: acc) end let reset_modules box = @@ -147,10 +147,12 @@ let search_symbol () = search_which := Textvariable.get which; let text = Entry.get ew in try if text = "" then () else - let l = match !search_which with - "itself" -> search_string_symbol text - | "iotype" -> search_string_type text mode:`included - | "exact" -> search_string_type text mode:`exact + let l = + match !search_which with + "itself" -> search_string_symbol text + | "iotype" -> search_string_type text mode:`included + | "exact" -> search_string_type text mode:`exact + | _ -> assert false in if l <> [] then choose_symbol title:"Choose symbol" env:!start_env l @@ -227,12 +229,12 @@ let start_shell () = Jg_entry.create entries command:(fun _ -> Button.invoke ok) and names = List.map fun:fst (Shell.get_all ()) in Entry.insert e1 index:`End text:!default_shell; - while List.mem names item:("Shell #" ^ string_of_int !shell_counter) do + while List.mem names key:("Shell #" ^ string_of_int !shell_counter) do incr shell_counter done; Entry.insert e2 index:`End text:("Shell #" ^ string_of_int !shell_counter); Button.configure ok command:(fun () -> - if not (List.mem names item:(Entry.get e2)) then begin + if not (List.mem names key:(Entry.get e2)) then begin default_shell := Entry.get e1; Shell.f prog:!default_shell title:(Entry.get e2); destroy tl @@ -243,7 +245,7 @@ let start_shell () = pack [ok;cancel] side:`Left fill:`X expand:true; pack [input;buttons] side:`Top fill:`X expand:true -let f ?:dir{= Unix.getcwd()} ?:on () = +let f ?:dir[=Unix.getcwd()] ?:on () = let tl = match on with None -> let tl = Jg_toplevel.titled "Module viewer" in |