--- toploop.ml.orig 2002-10-24 17:29:41.000000000 +0200 +++ toploop.ml 2002-10-24 17:38:20.000000000 +0200 @@ -347,7 +347,25 @@ Compile.init_path() let load_ocamlinit ppf = - if Sys.file_exists ".ocamlinit" then ignore(use_silently ppf ".ocamlinit") + let homedir = + try Some (Sys.getenv "HOME") + with Not_found -> None + in + let initfile = + if Sys.file_exists ".ocamlinit" then + Some ".ocamlinit" + else + (match homedir with + | Some d -> + if Sys.file_exists (d ^ "/.ocamlinit") then + Some (d ^ "/.ocamlinit") + else + None + | None -> None) + in + match initfile with + | Some f -> ignore(use_silently ppf f) + | None -> () let set_paths () = (* Add whatever -I options have been specified on the command line,