[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 16/23: [mm]: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 16/23: [mm]: Trivially refactor. |
Date: |
Wed, 16 Oct 2024 15:00:29 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 7405226e5df0aef017b4c0b2fd6f7e6781792f7b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Oct 15 10:36:10 2024 -0500
[mm]: Trivially refactor.
* m.tmac: Rename internal register `ref*flag` to `ref*was-RS-used`,
which has the startling property of documenting what it's for.
(TC, B2, RS, ref@eot-print, ref@print-refs): Do it.
(ref@print-refs): Also drop autoincrement amount from register
redefinition. Autoincrementation was never used with it, and it looks
like a copy-and-paste error from an `RP` call in `TC`.
---
contrib/mm/ChangeLog | 10 ++++++++++
contrib/mm/m.tmac | 12 ++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 17fc99672..d0dfdff65 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-15 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Trivially refactor. Rename internal register
+ `ref*flag` to `ref*was-RS-used`, which has the startling
+ property of documenting what it's for.
+ (TC, B2, RS, ref@eot-print, ref@print-refs): Do it.
+ (ref@print-refs): Also drop autoincrement amount from register
+ redefinition. Autoincrementation was never used with it, and it
+ looks like a copy-and-paste error from an `RP` call in `TC`.
+
2024-10-15 G. Branden Robinson <g.branden.robinson@gmail.com>
* m.tmac (EM): Simplify string definition: interpolate only the
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 453f4bfe2..c26c26f76 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2700,7 +2700,7 @@ exceeds depth of nested lists (\\n[li*lvl])
.br
.\" print any pending displays and references
.df@print-float 3
-.if \\n[ref*flag] .RP 0 1
+.if \\n[ref*was-RS-used] .RP 0 1
.\"
.if \w@\\$1@>0 .nr toc*slevel \\$1
.if \w@\\$2@>0 .nr toc*spacing (u;\\$2*\\n[Lsp])
@@ -3079,7 +3079,7 @@ exceeds depth of nested lists (\\n[li*lvl])
.nr ref*nr 0 1
.aln :R ref*nr
.nr ref*nr-width 5n
-.nr ref*flag 0 \" for end-of-text
+.nr ref*was-RS-used 0 \" for end-of-text
.ds ref*nroff-( [
.ds ref*troff-( \v'-.4m'\s-3
.ds ref*nroff-) ]
@@ -3115,7 +3115,7 @@ exceeds depth of nested lists (\\n[li*lvl])
.de RS
.ref*set-mark-style \" in case the document changed it
.if !''\\$1' .ds \\$1 \\*[ref*(]\\n[ref*nr]\\*[ref*)]
-.nr ref*flag 1
+.nr ref*was-RS-used 1
.am ref*mac
.ref@start-print \\n[ref*nr]
\\..
@@ -3176,10 +3176,10 @@ argument: '\\$2'
.\"-----------
.\" called by end-of-text!
.de ref@eot-print
-.\".if \\n[ref*flag] \{\
+.\".if \\n[ref*was-RS-used] \{\
.if d ref*mac \{\
. if \\n[D]>2 .tm Print references, called by eot
-. nr ref*flag 0
+. nr ref*was-RS-used 0
. br
. misc@ev-keep ne
. @reset
@@ -3208,7 +3208,7 @@ argument: '\\$2'
.in
.rm ref*mac
.ev
-.nr ref*flag 0 1
+.nr ref*was-RS-used 0
..
.\"########################### module app ############################
.\"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 16/23: [mm]: Trivially refactor.,
G. Branden Robinson <=