diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-07 00:50:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-07 00:50:34 +0000 |
commit | 51dbcefc64890d499c9774c7fc75ddfc3fa3cda0 (patch) | |
tree | dd71467196fa8b9fadf981c2c2d24f55cdbf09f4 /roff.7 | |
parent | 769591af89ed40c463f2c2fe74f6fc33b79f0281 (diff) | |
download | mandoc-51dbcefc64890d499c9774c7fc75ddfc3fa3cda0.tar.gz mandoc-51dbcefc64890d499c9774c7fc75ddfc3fa3cda0.tar.zst mandoc-51dbcefc64890d499c9774c7fc75ddfc3fa3cda0.zip |
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.7 | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.85 2017/06/06 15:03:35 schwarze Exp $ +.\" $Id: roff.7,v 1.86 2017/06/07 00:50:34 schwarze Exp $ .\" .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010,2011,2013-2015,2017 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 6 2017 $ +.Dd $Mdocdate: June 7 2017 $ .Dt ROFF 7 .Os .Sh NAME @@ -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. |