summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-07 00:50:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-07 00:50:34 +0000
commit29a53f97793b69d7bc6667efd7fdcdce180a5997 (patch)
treeceac2b5e0ea3963917778caaa5f343247c612e24 /roff.7
parente4e20fb8865c9f2f621fc06cfd9abcf953128959 (diff)
downloadmandoc-29a53f97793b69d7bc6667efd7fdcdce180a5997.tar.gz
Implement the roff(7) .rn (rename macro or string) request.
Renaming a user-defined macro is very simple: just copy the definition to the new name and delete the old name. Renaming high-level macros is a bit tricky: use a dedicated key-value-table, with non-standard names as keys and standard names as values. When a macro is found that is not user-defined, look it up in the "renamed" table and translate it back to the standard name before passing it on to the high-level parsers.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.713
1 files changed, 11 insertions, 2 deletions
diff --git a/roff.7 b/roff.7
index df67fc17..a12c8a42 100644
--- a/roff.7
+++ b/roff.7
@@ -530,7 +530,7 @@ input lines without filling.
.Ar N
defaults to 1.
An argument of 0 or less ends centering.
-Currently, high level macros abort certering.
+Currently, high level macros abort centering.
.It Ic \&cf Ar filename
Output the contents of a file.
Ignored because insecure.
@@ -1482,7 +1482,16 @@ Currently ignored.
Remove a request, macro or string.
.It Ic \&rn Ar oldname newname
Rename a request, macro, diversion, or string.
-Currently unsupported.
+In
+.Xr mandoc 1 ,
+user-defined macros,
+.Xr mdoc 7
+and
+.Xr man 7
+macros, and user-defined strings can be renamed, but renaming of
+predefined strings and of
+.Nm
+requests is not supported, and diversions are not implemented at all.
.It Ic \&rnn Ar oldname newname
Rename a number register.
Currently unsupported.