diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-08-27 07:32:00 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-09-02 18:22:50 -0500 |
commit | e9e92ee00811f7d0fcbde415346f7f4f7be14528 (patch) | |
tree | b94c85b2639548842591c6f7e18e2f087502e095 | |
parent | 1d4a4d4453ca709282c2242a5bc7ef088b82fdd6 (diff) | |
download | groff-git-e9e92ee00811f7d0fcbde415346f7f4f7be14528.tar.gz |
[mdoc]: Trivially refactor.
* tmac/doc.tmac:
* tmac/mdoc/doc-common: Rename string `doc-command-name` to
`doc-topic-name`; the former is misleading for man pages not in
sections 1, 6, or 8.
Also annotate deliberately empty string assignments.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | tmac/doc.tmac | 26 | ||||
-rw-r--r-- | tmac/mdoc/doc-common | 16 |
3 files changed, 30 insertions, 21 deletions
@@ -1,3 +1,12 @@ +2022-08-27 G. Branden Robinson <g.branden.robinson@gmail.com> + + [mdoc]: Trivially refactor. + + * tmac/doc.tmac: + * tmac/mdoc/doc-common: Rename string `doc-command-name` to + `doc-topic-name`; the former is misleading for man pages not in + sections 1, 6, or 8. + 2022-08-25 Bjarni Ingi Gislason <bjarniig@vortex.is> * man/groff_char.7.man: Fix bad example syntax. diff --git a/tmac/doc.tmac b/tmac/doc.tmac index a75ec4e08..d46a2c0d4 100644 --- a/tmac/doc.tmac +++ b/tmac/doc.tmac @@ -939,10 +939,10 @@ .als doc-Ms-font doc-Sy-font . . -.\" NS doc-command-name global string +.\" NS doc-topic-name global string .\" NS save first invocation of .Nm . -.ds doc-command-name +.ds doc-topic-name \" empty . . .\" NS Nm user macro @@ -950,7 +950,7 @@ .\" NS .\" NS modifies: .\" NS doc-arg-ptr -.\" NS doc-command-name +.\" NS doc-topic-name .\" NS doc-curr-font .\" NS doc-indent-synopsis .\" NS doc-indent-synopsis-active @@ -965,10 +965,10 @@ . ie \n[.$] \ . doc-parse-args \$@ . el \{\ -. ie "\*[doc-command-name]"" \ +. ie "\*[doc-topic-name]"" \ . tm Usage: .Nm name ... (#\n[.c]) . el \ -. doc-parse-args \*[doc-command-name] +. doc-parse-args \*[doc-topic-name] . \}\} . . if !\n[doc-arg-limit] \ @@ -978,24 +978,24 @@ . doc-print-prefixes . ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\ . \" last argument -. ie "\*[doc-command-name]"" \{\ +. ie "\*[doc-topic-name]"" \{\ . tm Usage: .Nm name ... (#\n[.c]) . doc-reset-args . \} . el \{\ -. nop \*[doc-Nm-font]\*[doc-command-name]\f[]\s[0]\c +. nop \*[doc-Nm-font]\*[doc-topic-name]\f[]\s[0]\c . doc-print-and-reset . \}\} . el \{\ . nr doc-curr-font \n[.f] . . ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\ -. ie "\*[doc-command-name]"" \ +. ie "\*[doc-topic-name]"" \ . tm Usage: .Nm name ... (#\n[.c]) . el \{\ . \" replace previous argument (Nm) with default value . nr doc-arg-ptr -1 -. ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[]\s[0] +. ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-topic-name]\f[]\s[0] . nr doc-type\n[doc-arg-ptr] 2 . ds doc-space\n[doc-arg-ptr] "\*[doc-space] . @@ -1019,8 +1019,8 @@ . \} . ti -\n[doc-indent-synopsis]u . \}\} -. if "\*[doc-command-name]"" \ -. ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]] +. if "\*[doc-topic-name]"" \ +. ds doc-topic-name "\*[doc-arg\n[doc-arg-ptr]] . . nop \*[doc-Nm-font]\c . \} @@ -3468,7 +3468,7 @@ . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active] . nr doc-have-decl-saved \n[doc-have-decl] . nr doc-have-var-saved \n[doc-have-var] -. ds doc-command-name-saved "\*[doc-command-name] +. ds doc-topic-name-saved "\*[doc-topic-name] . ds doc-quote-left-saved "\*[doc-quote-left] . ds doc-quote-right-saved "\*[doc-quote-right] . nr doc-nesting-level-saved \n[doc-nesting-level] @@ -3612,7 +3612,7 @@ . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved] . nr doc-have-decl \n[doc-have-decl-saved] . nr doc-have-var \n[doc-have-var-saved] -. ds doc-command-name "\*[doc-command-name-saved] +. ds doc-topic-name "\*[doc-topic-name-saved] . ds doc-quote-left "\*[doc-quote-left-saved] . ds doc-quote-right "\*[doc-quote-right-saved] . nr doc-nesting-level \n[doc-nesting-level-saved] diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common index 9a019e7e0..fc8b8cc1c 100644 --- a/tmac/mdoc/doc-common +++ b/tmac/mdoc/doc-common @@ -219,7 +219,7 @@ .\" NS doc-document-title .\" NS doc-section .\" NS doc-volume -.\" NS doc-command-name +.\" NS doc-topic-name .\" NS .\" NS local variables: .\" NS doc-volume-as-XXX @@ -342,7 +342,7 @@ .eo .de Dt . \" reset default arguments -. ds doc-document-title UNTITLED +. ds doc-topic-name \" empty . ds doc-volume LOCAL . ds doc-section \" empty . ds doc-command-name @@ -418,7 +418,7 @@ .\" NS .\" NS modifies: .\" NS doc-operating-system -.\" NS doc-command-name +.\" NS doc-topic-name .\" NS .\" NS local variables: .\" NS doc-operating-system-XXX-XXX @@ -823,7 +823,7 @@ . .eo .de Os -. ds doc-command-name +. ds doc-topic-name \" empty . . ie "\$1"" \ . ds doc-operating-system "\*[doc-default-operating-system] @@ -899,7 +899,7 @@ .\" NS doc-date-string global string .\" NS the manual page date as set by 'Dd' . -.ds doc-date-string +.ds doc-date-string \" empty . . .\" NS Dd user macro (not parsed, not callable) @@ -907,13 +907,13 @@ .\" NS .\" NS modifies: .\" NS doc-date-string -.\" NS doc-command-name +.\" NS doc-topic-name .\" NS .\" NS width register 'Dd' set above . .eo .de Dd -. ds doc-command-name +. ds doc-topic-name \" empty . ie "\$1"$Mdocdate:" .ds doc-date-string \$2\~\$3, \$4 . el .ds doc-date-string \$* .. @@ -1464,7 +1464,7 @@ . tm doc-indent-synopsis-active == \n[doc-indent-synopsis-active] . tm doc-have-decl == \n[doc-have-decl] . tm doc-have-var == \n[doc-have-var] -. tm doc-command-name == '\*[doc-command-name]' +. tm doc-topic-name == '\*[doc-topic-name]' . tm doc-quote-left == '\*[doc-quote-left]' . tm doc-quote-right == '\*[doc-quote-right]' . tm doc-nesting-level == \n[doc-nesting-level] |