diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-06-07 00:50:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-06-07 00:50:31 +0000 |
commit | 2f73e4c4e2bc7eeb6ebc0593aa314d0e33bcc55c (patch) | |
tree | 94260b30e397e4200fe585992225b6d6f25e8007 /share/man/man7 | |
parent | db74cbc6de07995498b6ee6eabfe3a0e7574587c (diff) |
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 'share/man/man7')
-rw-r--r-- | share/man/man7/roff.7 | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/share/man/man7/roff.7 b/share/man/man7/roff.7 index c0c30372de7..b3fe9f571e5 100644 --- a/share/man/man7/roff.7 +++ b/share/man/man7/roff.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: roff.7,v 1.65 2017/06/06 15:00:56 schwarze Exp $ +.\" $OpenBSD: roff.7,v 1.66 2017/06/07 00:50:30 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 @@ -528,7 +528,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. @@ -1480,7 +1480,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. |