aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authorcharguer2018-11-13 10:32:02 +0100
committerVincent Laporte2019-03-18 10:29:51 +0000
commit3149d03bd4e8879045819d6cfc67ae4e0ccaf1fc (patch)
treef3f5bbaa40b5d2deed297fea62275abe85712404 /ide
parent4625a6dc8a949a5fb7a9fdecd5e657ad638fefb1 (diff)
implementation installation of default unicode bindings
Diffstat (limited to 'ide')
-rw-r--r--ide/preferences.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml
index 7cca715dc3..205961261a 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -254,10 +254,12 @@ let get_bindings_local_file () =
with Not_found -> None
let get_bindings_default_file () =
- let ( / ) = Filename.concat in
- let path = Envars.coqlib () / "ide/default.bindings" in
- Printf.eprintf "==> %s\n" path;
- if Sys.file_exists path then Some path else None
+ let name = "default.bindings" in
+ let chk d = Sys.file_exists (Filename.concat d name) in
+ try
+ let dir = List.find chk (Minilib.coqide_data_dirs ()) in
+ Some (Filename.concat dir name)
+ with Not_found -> None
(** Hooks *)