aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-04-28 17:16:59 +0000
committerGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-04-28 17:16:59 +0000
commit364902a41bf9e01bb749f0bf44f054db0b8ec686 (patch)
treee0f8a3a1212bc14a55514ce340633f38907dd5fa
parentaf4955b19ea1331fb466dc01ed56713112c30d8e (diff)
Attempt to use more local doc in coqide
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14083 85f007b7-540e-0410-9357-904b9bb8a0f7
-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