diff options
Diffstat (limited to 'ide/preferences.ml')
-rw-r--r-- | ide/preferences.ml | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml index e31a5904a..97b1d00dd 100644 --- a/ide/preferences.ml +++ b/ide/preferences.ml @@ -168,7 +168,7 @@ let save_pref () = (try GtkData.AccelMap.save accel_file with _ -> ()); let p = !current in - try + let add = Minilib.Stringmap.add in let (++) x f = f x in Minilib.Stringmap.empty ++ @@ -219,12 +219,11 @@ let save_pref () = add "vertical_tabs" [string_of_bool p.vertical_tabs] ++ add "opposite_tabs" [string_of_bool p.opposite_tabs] ++ Config_lexer.print_file pref_file - with _ -> prerr_endline "Could not save preferences." let load_pref () = (try GtkData.AccelMap.load accel_file with _ -> ()); let p = !current in - try + let m = Config_lexer.load_file pref_file in let np = { p with cmd_coqc = p.cmd_coqc } in let set k f = try let v = Minilib.Stringmap.find k m in f v with _ -> () in @@ -271,7 +270,7 @@ let load_pref () = v <> Coq_config.wwwcoq ^ "doc" && v <> Coq_config.wwwcoq ^ "doc/" then - prerr_endline ("Warning: Non-standard URL for Coq documentation in preference file: "^v); + (*prerr_endline ("Warning: Non-standard URL for Coq documentation in preference file: "^v);*) np.doc_url <- v); set_hd "library_url" (fun v -> np.library_url <- v); set_bool "show_toolbar" (fun v -> np.show_toolbar <- v); @@ -286,13 +285,10 @@ let load_pref () = set_bool "lax_syntax" (fun v -> np.lax_syntax <- v); set_bool "vertical_tabs" (fun v -> np.vertical_tabs <- v); set_bool "opposite_tabs" (fun v -> np.opposite_tabs <- v); - current := np; + current := np (* Format.printf "in load_pref: current.text_font = %s@." (Pango.Font.to_string !current.text_font); *) - with e -> - prerr_endline ("Could not load preferences ("^ - (Printexc.to_string e)^").") let configure ?(apply=(fun () -> ())) () = let cmd_coqc = |