gbranden pushed a commit to branch master
in repository groff.

commit 8e72e6942f71232210d00feda177df405507dae7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Apr 1 02:19:31 2026 -0500

    tmac/an.tmac: Trivially refactor (4/4).
    
    * tmac/an.tmac (TH, AT, UC, PT, BT)
      (an*abbreviate-page-identifier, an*abbreviate-inner-footer): Rename
      `an-extra[123]` strings to `an*extra[123]`.
---
 ChangeLog    |  8 ++++++++
 tmac/an.tmac | 62 ++++++++++++++++++++++++++++++------------------------------
 2 files changed, 39 insertions(+), 31 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c8c04980d..9263eaf49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-04-01  G. Branden Robinson <[email protected]>
+
+       [man]: Trivially refactor.
+
+       * tmac/an.tmac (TH, AT, UC, PT, BT)
+       (an*abbreviate-page-identifier, an*abbreviate-inner-footer):
+       Rename `an-extra[123]` strings to `an*extra[123]`.
+
 2026-04-01  G. Branden Robinson <[email protected]>
 
        [man]: Trivially refactor.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index a57395f6e..25e677118 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -376,27 +376,27 @@
 .  ds an*ident "\\$1\"
 .  if \\n[CT] .stringup an*ident
 .  ds an*section "\\$2\"
-.  ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
+.  ie (\\n[.$] > 4) .ds an*extra3 "\\$5\"
 .  el \{\
-.    ds an-extra3 \" empty
+.    ds an*extra3 \" empty
 .    if \B'\\$2' \{\
 .      if ((\\$2 > 0) & (\\$2 < 10)) \
-.        ds an-extra3 \\*[an*section\\$2]
+.        ds an*extra3 \\*[an*section\\$2]
 .    \}
 .  \}
 .
-.  ds an-extra1 "\\$3\"
-.  ie (\\n[.$] > 3)    .ds an-extra2 "\\$4\"
-.  el                  .ds an-extra2 \" empty; but .AT/.UC can override
+.  ds an*extra1 "\\$3\"
+.  ie (\\n[.$] > 3)    .ds an*extra2 "\\$4\"
+.  el                  .ds an*extra2 \" empty; but .AT/.UC can override
 .
-.  if '\\*[an-extra1]'' \{\
+.  if '\\*[an*extra1]'' \{\
 .    ds an*msg .\\$0 missing third argument; consider document\"
 .    as an*msg " modification date in ISO 8601 format (YYYY-MM-DD)\"
 .    an*style-warn \\*[an*msg]
 .    rm an*msg
 .  \}
 .
-.  if '\\*[an-extra2]'' \{\
+.  if '\\*[an*extra2]'' \{\
 .    ds an*msg .\\$0 missing fourth argument; consider package/project\"
 .    \" Yes, that's one double quote, then three, then two.
 .    as an*msg " name and version (e.g., """groff 1.23.0"")\"
@@ -404,7 +404,7 @@
 .    rm an*msg
 .  \}
 .
-.  if '\\$5\\*[an-extra3]'' \{\
+.  if '\\$5\\*[an*extra3]'' \{\
 .    ds an*msg .\\$0 missing fifth argument and second argument '\\$2'\"
 .    as an*msg " not a recognized manual section; specify its title\"
 .    an*style-warn \\*[an*msg]
@@ -447,12 +447,12 @@
 .\" .AT [system-id[ release-id]]
 .de1 AT
 .  nop \\*[an-deprecation-warn]\\
-.  ds an-extra2 7th Edition\"
-.  if '\\$1'3' .ds an-extra2 7th Edition\"
-.  if '\\$1'4' .ds an-extra2 System III\"
+.  ds an*extra2 7th Edition\"
+.  if '\\$1'3' .ds an*extra2 7th Edition\"
+.  if '\\$1'4' .ds an*extra2 System III\"
 .  if '\\$1'5' \{\
-.    ie '\\$2'' .ds an-extra2 System V\"
-.    el         .ds an-extra2 System V Release \\$2\"
+.    ie '\\$2'' .ds an*extra2 System V\"
+.    el         .ds an*extra2 System V Release \\$2\"
 .  \}
 .  ev an*env-header-and-footer
 .  an*abbreviate-inner-footer
@@ -463,12 +463,12 @@
 .\" .UC [system-id]
 .de1 UC
 .  nop \\*[an-deprecation-warn]\\
-.  ds an-extra2 3rd Berkeley Distribution\"
-.  if '\\$1'3' .ds an-extra2 3rd Berkeley Distribution\"
-.  if '\\$1'4' .ds an-extra2 4th Berkeley Distribution\"
-.  if '\\$1'5' .ds an-extra2 4.2 Berkeley Distribution\"
-.  if '\\$1'6' .ds an-extra2 4.3 Berkeley Distribution\"
-.  if '\\$1'7' .ds an-extra2 4.4 Berkeley Distribution\"
+.  ds an*extra2 3rd Berkeley Distribution\"
+.  if '\\$1'3' .ds an*extra2 3rd Berkeley Distribution\"
+.  if '\\$1'4' .ds an*extra2 4th Berkeley Distribution\"
+.  if '\\$1'5' .ds an*extra2 4.2 Berkeley Distribution\"
+.  if '\\$1'6' .ds an*extra2 4.3 Berkeley Distribution\"
+.  if '\\$1'7' .ds an*extra2 4.4 Berkeley Distribution\"
 .  ev an*env-header-and-footer
 .  an*abbreviate-inner-footer
 .  ev
@@ -498,7 +498,7 @@
 .    an*bookmark \\n[an*bookmark-level]  "\\*[an*page-ref-string]"
 .    ds an*previous-page-ref-string "\\*[an*page-ref-string]
 .  \}
-.  tl '\\*[an-pageref]'\\*[an-extra3]'\\*[an-pageref]'
+.  tl '\\*[an-pageref]'\\*[an*extra3]'\\*[an-pageref]'
 .  ie \\n[cR] .sp 1v
 .  el         .sp .5i
 ..
@@ -507,11 +507,11 @@
 .if d BT .ig
 .de1 BT
 .  ie \\n[D] \{\
-.    if o .tl '\\*[an*ifoot]'\\*[an-extra1]'\\*[an*ofoot]'
-.    if e .tl '\\*[an*ofoot]'\\*[an-extra1]'\\*[an*ifoot]'
+.    if o .tl '\\*[an*ifoot]'\\*[an*extra1]'\\*[an*ofoot]'
+.    if e .tl '\\*[an*ofoot]'\\*[an*extra1]'\\*[an*ifoot]'
 .  \}
 .  el \
-.    tl '\\*[an*ifoot]'\\*[an-extra1]'\\*[an*ofoot]'
+.    tl '\\*[an*ifoot]'\\*[an*extra1]'\\*[an*ofoot]'
 ..
 .
 .\" Abbreviate page identifier if it's too long for the header.  Leaves
@@ -529,7 +529,7 @@
 .  \" Computer width of title text, plus 2n for minimal spacing on
 .  \" either side of the center header.
 .  nr an-header-width \
-     (\\w'\\*[an-pageref]\\*[an-extra3]\\*[an-pageref]' + 2n)
+     (\\w'\\*[an-pageref]\\*[an*extra3]\\*[an-pageref]' + 2n)
 .  while (\\n[an-header-width] > \\n[.lt]) \{\
 .    \" The page topic is too long; trim some bits out of the middle.
 .    length an*ident-length \\*[an*ident-string]
@@ -554,7 +554,7 @@
 .    ds an-pageref \\*[an*ident-abbv](\\*[an*section])\"
 .    \" Recompute header width now that it's shorter.
 .    nr an-header-width \
-       (\\w'\\*[an-pageref]\\*[an-extra3]\\*[an-pageref]' + 2n)
+       (\\w'\\*[an-pageref]\\*[an*extra3]\\*[an-pageref]' + 2n)
 .  \}
 .  ds an-pageref \\*[an-lic]\f[\\*[MF]]\\*[an*ident-abbv]\\*[an-ic]\
 \f[R](\\*[an*section])\"
@@ -594,19 +594,19 @@
 .  rr an*index
 ..
 .
-.\" Abbreviate the `an-extra2` string (set by .TH) if it's too long for
+.\" Abbreviate the `an*extra2` string (set by .TH) if it's too long for
 .\" the footer.  The formatted width of the inner footer plus half that
 .\" of the center footer must be less than half the title width or we
-.\" must abbreviate.  By default, `an-extra2` is placed as the inner
+.\" must abbreviate.  By default, `an*extra2` is placed as the inner
 .\" footer.  We call its (potential) abbreviation `an*ifoot` here and
 .\" leave it defined for .BT use.  (`an*ofoot` is not treated the same
 .\" way.  `an-footer` regenerates it on every page because the page
 .\" number changes if present.)  Shorten the inner footer if necessary
 .\" by trimming characters off the end, replacing them with an ellipsis.
 .de an*abbreviate-inner-footer
-.  ds an*ifoot \\*[an-extra2]\"
+.  ds an*ifoot \\*[an*extra2]\"
 .  nr an*half-title-width (\\n[.lt] / 2u)
-.  nr an*half-cfoot-width (\w'\\*[an-extra1]' / 2u)
+.  nr an*half-cfoot-width (\w'\\*[an*extra1]' / 2u)
 .  nr an*half-footer-width \
      (\w'\\*[an*ifoot]' + \\n[an*half-cfoot-width])
 .  if (\\n[an*half-footer-width] < \\n[an*half-title-width]) \{\
@@ -1497,7 +1497,7 @@ contains unsupported escape sequence
 .nr an-need-break 0
 .ds an-pageref \" empty
 .ds an*ifoot \" empty
-.ds an-extra1 \" empty
+.ds an*extra1 \" empty
 .
 .\" We don't have to worry about "xhtml" (it's mapped to "html"), but we
 .\" do need to account for pre-grohtml(1)'s use of "groff -Tps".

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to