summaryrefslogtreecommitdiffstats
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-02 15:31:59 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-02 15:31:59 +0000
commit9a0fd61677909a43ee8a1f7d69598769f9a7ad6b (patch)
treeff9b788408b481515dd3eae168a45e4aea03416d /mandoc.1
parent58be69d2a5cab3e51bf16a2880fbfa2115dad47d (diff)
downloadmandoc-9a0fd61677909a43ee8a1f7d69598769f9a7ad6b.tar.gz
add warning "cross reference to self"; inspired by mdoclint
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.118
1 files changed, 18 insertions, 0 deletions
diff --git a/mandoc.1 b/mandoc.1
index c68335a5..8da51c61 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1097,6 +1097,24 @@ The same standard section title occurs more than once.
.Pq mdoc
A standard section header occurs in a section of the manual
where it normally isn't useful.
+.It Sy "cross reference to self"
+.Pq mdoc
+An
+.Ic \&Xr
+macro refers to a name and section matching the section of the present
+manual page and a name mentioned in an
+.Ic \&Nm
+macro in the NAME or SYNOPSIS section, or in an
+.Ic \&Fn
+or
+.Ic \&Fo
+macro in the SYNOPSIS.
+Consider using
+.Ic \&Nm
+or
+.Ic \&Fn
+instead of
+.Ic \&Xr .
.It Sy "unusual Xr order"
.Pq mdoc
In the SEE ALSO section, an