aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2019-04-27 22:19:15 +0200
committerHugo Herbelin2019-04-27 22:19:15 +0200
commit9b2cbdcdaac203999484ef90225f6cba5e8052db (patch)
tree6fc2fb3cbbd8d3eb853fcf87c0218cca32bc6f37
parentae4239d6a5f4afcd9b7321dba790ffd4a64994a1 (diff)
CoqiDE: Load coqide.keys after coqiderc (addressing part of #9899).
This avoids the modifiers keys to overwrite changes made in coqide.keys.
-rw-r--r--ide/preferences.ml19
1 files changed, 11 insertions, 8 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml
index 47cd4c58b6..57bc0f583f 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -658,15 +658,18 @@ let save_pref () =
Config_lexer.print_file pref_file prefs
let load_pref () =
+ (* Load main preference file *)
+ let () =
+ let m = Config_lexer.load_file loaded_pref_file in
+ let iter name v =
+ if Util.String.Map.mem name !preferences then
+ try (Util.String.Map.find name !preferences).set v with _ -> ()
+ else unknown_preferences := Util.String.Map.add name v !unknown_preferences
+ in
+ Util.String.Map.iter iter m in
+ (* Load file for bindings *)
let () = try GtkData.AccelMap.load loaded_accel_file with _ -> () in
-
- let m = Config_lexer.load_file loaded_pref_file in
- let iter name v =
- if Util.String.Map.mem name !preferences then
- try (Util.String.Map.find name !preferences).set v with _ -> ()
- else unknown_preferences := Util.String.Map.add name v !unknown_preferences
- in
- Util.String.Map.iter iter m
+ ()
let pstring name p = string ~f:p#set name p#get
let pbool name p = bool ~f:p#set name p#get