@@ -199,18 +199,36 @@ <h3 class="subsection">10.2.1 Changing the name of the coq project file</h3>
199199</ p >
200200< dl >
201201< dt > < a class ="anchor " id ="index-coq_002dproject_002dfilename "> </ a > < u > Variable:</ u > < b > coq-project-filename</ b > </ dt >
202- < dd > < p > The name of coq project file.< br >
203- The coq project file of a coq development (cf. Coq documentation on
204- "makefile generation") should contain the arguments given to
205- coq_makefile. In particular it contains the -I and -R
206- options (preferably one per line). If ‘< samp > coq-use-coqproject</ samp > ’ is
202+ < dd > < p > Variable containing the function detecting a project file.
203+ </ p >
204+ < p > See its default value ‘< samp > < code > coq--default-project-find-file</ code > </ samp > ’ for an example.
205+ </ p >
206+ < p > The function takes one argument, the name of a directory, and returns
207+ the name of a coq/rocq project file it contains if there is one. Return
208+ nil otherwise.
209+ </ p >
210+ < p > This is used to detect the coq project file (using
211+ ‘< samp > < code > locate-dominating-file</ code > </ samp > ’). By default we accept _CoqProject and
212+ _RocqProject (and any case-variant of these) without checking coq/rocq
213+ version. If you want something smarter please redefine
214+ ‘< samp > < code > coq-project-filename</ code > </ samp > ’ directly by using:
215+ </ p >
216+ < p > (setq < code > coq-project-filename</ code > #’my-own-predicate)
217+ </ p >
218+ < p > About the coq/rocq project file (cf. Coq documentation on project files
219+ and "makefile generation"):
220+ </ p >
221+ < p > The coq project file of a coq development should contain the arguments
222+ given to coq_makefile. In particular it contains the -I and -R
223+ options (preferably one per line). If ‘< samp > coq-use-coqproject</ samp > ’ is
207224t (default) the content of this file will be used by Proof General to
208- infer the ‘< samp > < code > coq-load-path</ code > </ samp > ’ and the ‘< samp > < code > coq-prog-args</ code > </ samp > ’ variables that set
209- the coqtop invocation by Proof General. This is now the recommended
210- way of configuring the coqtop invocation. Local file variables may
211- still be used to override the coq project file’s configuration.
212- .dir-locals.el files also work and override project file settings.
213- </ p > </ dd > </ dl >
225+ infer the ‘< samp > < code > coq-load-path</ code > </ samp > ’ and the ‘< samp > < code > coq-prog-args</ code > </ samp > ’ variables that set the
226+ coqtop invocation by Proof General. This is now the recommended way of
227+ configuring the coqtop invocation. Local file variables may still be
228+ used to override the coq project file’s configuration. .dir-locals.el
229+ files also work and override project file settings.
230+ </ p >
231+ </ dd > </ dl >
214232
215233
216234< hr size ="6 ">
0 commit comments