aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ide/ideutils.ml9
-rw-r--r--ide/minilib.ml2
-rw-r--r--ide/preferences.ml6
3 files changed, 7 insertions, 10 deletions
diff --git a/ide/ideutils.ml b/ide/ideutils.ml
index 1b2cd0f89..a27a62170 100644
--- a/ide/ideutils.ml
+++ b/ide/ideutils.ml
@@ -298,13 +298,8 @@ let browse f url =
let doc_url () =
if !current.doc_url = use_default_doc_url || !current.doc_url = "" then
- if Sys.file_exists
- (String.sub Coq_config.localwwwrefman 7
- (String.length Coq_config.localwwwrefman - 7))
- then
- Coq_config.localwwwrefman
- else
- Coq_config.wwwrefman
+ let addr = List.fold_left Filename.concat (Coq_config.docdir) ["html";"refman";"index.html"] in
+ if Sys.file_exists addr then "file://"^addr else Coq_config.wwwrefman
else !current.doc_url
let url_for_keyword =
diff --git a/ide/minilib.ml b/ide/minilib.ml
index f072ff9fa..b1f85d2fe 100644
--- a/ide/minilib.ml
+++ b/ide/minilib.ml
@@ -56,7 +56,7 @@ let list_filter_i p =
filter_i_rec 0
let subst_command_placeholder s t =
- Str.global_replace (Str.regexp_string "%s") s t
+ Str.global_replace (Str.regexp_string "%s") t s
(* On win32, the home directory is probably not in $HOME, but in
some other environment variable *)
diff --git a/ide/preferences.ml b/ide/preferences.ml
index 97b1d00dd..7beacfcd2 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -505,8 +505,7 @@ let configure ?(apply=(fun () -> ())) () =
"netscape -remote \"openURL(%s)\"";
"mozilla -remote \"openURL(%s)\"";
"firefox -remote \"openURL(%s,new-windows)\" || firefox %s &";
- "seamonkey -remote \"openURL(%s)\" || seamonkey %s &";
- "open -a Safari %s &"
+ "seamonkey -remote \"openURL(%s)\" || seamonkey %s &"
] in
combo
~help:"(%s for url)"
@@ -519,6 +518,8 @@ let configure ?(apply=(fun () -> ())) () =
in
let doc_url =
let predefined = [
+ "file://"^(List.fold_left Filename.concat (Coq_config.docdir) ["html";"refman";""]);
+ Coq_config.wwwrefman;
use_default_doc_url
] in
combo
@@ -530,6 +531,7 @@ let configure ?(apply=(fun () -> ())) () =
!current.doc_url in
let library_url =
let predefined = [
+ "file://"^(List.fold_left Filename.concat (Coq_config.docdir) ["html";"stdlib";""]);
Coq_config.wwwstdlib
] in
combo