aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Pit-Claudel2018-05-18 01:10:15 -0400
committerThéo Zimmermann2018-09-20 10:12:55 +0200
commit0b5251ee8a6f69d4b0700991884e68dfdfcf8ad6 (patch)
tree427d52510945896ae12076c8822a9159160f65f1
parente45bada261c42152e0b835cae7e989a7fccc0fb7 (diff)
[doc] Rewrite and document the prodn directive
It was broken and undocumented. We dropped the git logs, too, so it wasn't clear who wrote it and why it was introduced in the first place.
-rw-r--r--doc/tools/coqrst/coqdomain.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/tools/coqrst/coqdomain.py b/doc/tools/coqrst/coqdomain.py
index 6317e6e214..2bf9776751 100644
--- a/doc/tools/coqrst/coqdomain.py
+++ b/doc/tools/coqrst/coqdomain.py
@@ -149,6 +149,13 @@ class CoqObject(ObjectDescription):
msg = MSG.format(name, self.env.doc2path(objects[name][0]))
self.state_machine.reporter.warning(msg, line=self.lineno)
+ def _warn_if_duplicate_name(self, objects, name):
+ """Check that two objects in the same domain don't have the same name."""
+ if name in objects:
+ MSG = 'Duplicate object: {}; other is at {}'
+ msg = MSG.format(name, self.env.doc2path(objects[name][0]))
+ self.state_machine.reporter.warning(msg, line=self.lineno)
+
def _record_name(self, name, target_id):
"""Record a name, mapping it to target_id