groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 21/38: tmac/an.tmac: Trivially refactor.


From: G. Branden Robinson
Subject: [groff] 21/38: tmac/an.tmac: Trivially refactor.
Date: Sun, 24 Mar 2024 16:59:58 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 67d00afbcec79ca2561959d9c9157c9abd2d1075
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 20 13:04:36 2024 -0500

    tmac/an.tmac: Trivially refactor.
    
    * tmac/an.tmac (an-reset-paragraph-spacing, RS, RE): Trivially refactor.
      Rename structurally named sets of registers emulating arrays (more
      precisely in this instance, stacks) to separate the index from the
      rest of the name with a `!` character, as is done in groff ms(7) and
      some other packages.  This makes the names more readable and less
      resembling of typos in the unfortunate event a troff(1) diagnostic
      message discloses their names to a hapless human reader.
---
 ChangeLog    | 11 +++++++++++
 tmac/an.tmac | 12 ++++++------
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6c80f7799..d5fc4d97f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-03-20  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (an-reset-paragraph-spacing, RS, RE): Trivially
+       refactor.  Rename structurally named sets of registers emulating
+       arrays (more precisely in this instance, stacks) to separate the
+       index from the rest of the name with a `!` character, as is done
+       in groff ms(7) and some other packages.  This makes the names
+       more readable and less resembling of typos in the unfortunate
+       event a troff(1) diagnostic message discloses their names to a
+       hapless human reader.
+
 2024-03-20  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/an.tmac (an-reset-paragraph-spacing): Assign
diff --git a/tmac/an.tmac b/tmac/an.tmac
index debd49d8b..d9e8232f8 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -178,9 +178,9 @@
 .de an-reset-margin-and-inset-level
 .  nr an-inset-level 1
 .  nr an-margin \\n[BP]
-.  nr an-saved-margin1 \\n[BP]
+.  nr an-saved-margin!1 \\n[BP]
 .  nr an-prevailing-indent \\n[IN]
-.  nr an-saved-prevailing-indent1 \\n[IN]
+.  nr an-saved-prevailing-indent!1 \\n[IN]
 ..
 .
 .\" Break the page and update its number depending on the C (consecutive
@@ -1019,8 +1019,8 @@ contains unsupported escape sequence
 .\" Start a relative inset level (by the amount given in the argument).
 .\" .RS [inset-amount]
 .de1 RS
-.  nr an-saved-margin\\n[an-inset-level] \\n[an-margin]
-.  nr an-saved-prevailing-indent\\n[an-inset-level] \
+.  nr an-saved-margin!\\n[an-inset-level] \\n[an-margin]
+.  nr an-saved-prevailing-indent!\\n[an-inset-level] \
      \\n[an-prevailing-indent]
 .  ie \\n[.$] .nr an-margin +(n;\\$1)
 .  el         .nr an-margin +\\n[an-prevailing-indent]
@@ -1051,9 +1051,9 @@ contains unsupported escape sequence
 .  ie \\n[.$] .nr an-inset-level ((;\\$1) <? \\n[an-inset-level])
 .  el         .nr an-inset-level -1
 .  nr an-inset-level (1 >? \\n[an-inset-level])
-.  nr an-margin \\n[an-saved-margin\\n[an-inset-level]]
+.  nr an-margin \\n[an-saved-margin!\\n[an-inset-level]]
 .  nr an-prevailing-indent \
-     \\n[an-saved-prevailing-indent\\n[an-inset-level]]
+     \\n[an-saved-prevailing-indent!\\n[an-inset-level]]
 .  in \\n[an-margin]u
 ..
 .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]