From 6af2902ddd8ea6d4171b882726e9bb4d2fc45748 Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 14 Aug 2009 14:02:23 +0000 Subject: Tried to make F1 documentation tool working in CoqIDE. In trunk: New strategy for compiling and finding index_url.txt. After all, this file is not specific to CoqIDE but to the documentation. Hence, it seems better to install it close to the documentation. If the documentation is locally installed, it is easy to find the file index_url.txt but what to do if the documentation is remote? We would need a http getter. Does this mean we have to rely on wget or so? In the absence of answer to this question, it seems reasonable, first to assume the doc to be locally installed, second to have a local copy of index_url.txt ready in the installation directory of CoqIDE. Also added an "automatic" field in the CoqIDE url preference to prevent the user to have to update his preference file every time a new version of Coq is out and the link to the doc change. In 8.2: Added a minima the installation of index_urls.txt but the user will have to update its preferences because the links "http://coq.inria.fr/doc/Reference-Manual010.html#..." do not longer exist. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12278 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/flags.ml | 9 +++++++++ lib/flags.mli | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/flags.ml b/lib/flags.ml index c0af148c70..dac88a4733 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -102,6 +102,15 @@ let browser_cmd_fmt = with Not_found -> Coq_config.browser +let is_standard_doc_url url = + let wwwcompatprefix = "http://www.lix.polytechnique.fr/coq/" in + let wwwprefix = "http://coq.inria.fr/" in + let n = String.length wwwprefix in + let n' = String.length Coq_config.wwwrefman in + url = Coq_config.localwwwrefman || + url = Coq_config.wwwrefman || + url = wwwcompatprefix ^ String.sub Coq_config.wwwrefman n (n'-n) + (* Options for changing coqlib *) let coqlib_spec = ref false let coqlib = ref Coq_config.coqlib diff --git a/lib/flags.mli b/lib/flags.mli index fe1157d881..8bafa8b1f3 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -70,7 +70,9 @@ val boxed_definitions : unit -> bool (* Returns string format for default browser to use from Coq or CoqIDE *) val browser_cmd_fmt : string - + +val is_standard_doc_url : string -> bool + (* Substitute %s in the first chain by the second chain *) val subst_command_placeholder : string -> string -> string -- cgit v1.2.3