diff options
| author | charguer | 2018-11-13 10:32:02 +0100 |
|---|---|---|
| committer | Vincent Laporte | 2019-03-18 10:29:51 +0000 |
| commit | 3149d03bd4e8879045819d6cfc67ae4e0ccaf1fc (patch) | |
| tree | f3f5bbaa40b5d2deed297fea62275abe85712404 | |
| parent | 4625a6dc8a949a5fb7a9fdecd5e657ad638fefb1 (diff) | |
implementation installation of default unicode bindings
| -rw-r--r-- | Makefile.ide | 4 | ||||
| -rw-r--r-- | ide/preferences.ml | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.ide b/Makefile.ide index f26c9bd282..efbc9ef389 100644 --- a/Makefile.ide +++ b/Makefile.ide @@ -218,7 +218,7 @@ endif install-ide-files: #Please update $(COQIDEAPP)/Contents/Resources/ at the same time $(MKDIR) $(FULLDATADIR) - $(INSTALLLIB) ide/coq.png ide/*.lang ide/coq_style.xml $(FULLDATADIR) + $(INSTALLLIB) ide/coq.png ide/*.lang ide/coq_style.xml $(IDEBINDINGS) $(FULLDATADIR) $(MKDIR) $(FULLCONFIGDIR) if [ $(IDEINT) = QUARTZ ] ; then $(INSTALLLIB) ide/mac_default_accel_map $(FULLCONFIGDIR)/coqide.keys ; fi @@ -246,7 +246,7 @@ $(COQIDEINAPP): ide/macos_prehook.cmx $(LINKIDEOPT) | $(COQIDEAPP)/Contents $(COQIDEAPP)/Contents/Resources/share: $(COQIDEAPP)/Contents $(MKDIR) $@/coq/ - $(INSTALLLIB) ide/coq.png ide/*.lang ide/coq_style.xml $@/coq/ + $(INSTALLLIB) ide/coq.png ide/*.lang ide/coq_style.xml $(IDEBINDINGS) $@/coq/ $(MKDIR) $@/gtksourceview-2.0/{language-specs,styles} $(INSTALLLIB) "$(SOURCEVIEWSHARE)/"gtksourceview-2.0/language-specs/{def.lang,language2.rng} $@/gtksourceview-2.0/language-specs/ $(INSTALLLIB) "$(SOURCEVIEWSHARE)/"gtksourceview-2.0/styles/{styles.rng,classic.xml} $@/gtksourceview-2.0/styles/ 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 *) |
