groff-commit
[Top][All Lists]
Advanced

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

[groff] 15/53: [me]: Fix automatic numbering of delayed text.


From: G. Branden Robinson
Subject: [groff] 15/53: [me]: Fix automatic numbering of delayed text.
Date: Tue, 14 Dec 2021 01:21:49 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 1ed0b9f52e9f8e44bc992e4cad4fa77a6021e4d8
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Dec 8 01:18:32 2021 +1100

    [me]: Fix automatic numbering of delayed text.
    
    * tmac/e.tmac: Fix automatic numbering of delayed text.
    
      (initialization, pd): Remove unused auto-incrementation from
      `$d` delayed text number register.
    
      (initialization, pd): Remove auto-incrementation from `$d` delayed
      text number register.
    
      ()d): Increment `$d` register unconditionally, no longer conditionally
      on whether the delayed text marker string `#` has been interpolated.
    
      ()d, pd): Update `#` string using new `_#` string.  Stop
      initializing the string with `\k` mark-setting escape sequence.
    
    * doc/meref.me (Annotations) <)d>: Document now-unconditional
      incrementation of `$d` register.
    
    Fixes <https://savannah.gnu.org/bugs/?61632>.
---
 ChangeLog    | 18 ++++++++++++++++++
 doc/meref.me |  4 +---
 tmac/e.tmac  | 15 +++++++--------
 3 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8d13b19..c2fe292 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2021-12-08  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/e.tmac: Fix automatic numbering of delayed text.
+       (initialization): Add `_#` string for use in multiple
+       assignments of `#` string.
+       (initialization, pd): Remove unused auto-incrementation from
+       `$d` delayed text number register.
+       ()d): Increment `$d` register unconditionally, no longer
+       conditionally on whether the delayed text marker string `#` has
+       been interpolated.
+       ()d, pd): Update `#` string using new `_#` string.  Stop
+       initializing the string with `\k` mark-setting escape sequence.
+
+       * doc/meref.me (Annotations) <)d>: Document now-unconditional
+       incrementation of `$d` register.
+
+       Fixes <https://savannah.gnu.org/bugs/?61632>.
+
 2021-12-07  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/tests/e_delayed-text-marks-work.sh: Add test.
diff --git a/doc/meref.me b/doc/meref.me
index 08f304c..b6bff0c 100644
--- a/doc/meref.me
+++ b/doc/meref.me
@@ -956,9 +956,7 @@ The delayed text register
 .NR ($d
 and the associated string
 .ST #
-are incremented if
-.ST #
-has been referenced.
+are incremented.
 .TL
 .b .pd
 .DE
diff --git a/tmac/e.tmac b/tmac/e.tmac
index cee4680..d8856df 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -1663,17 +1663,15 @@
 ..
 .
 .de )d                 \" *** end delayed text
-.if \\n# \
-.      nr $d +1
-.ds # [\\n($d]\k#
-.rr #
+.nr $d +1
+.ds # \\*(_#
 ..
 .
 .de pd                 \" *** print delayed text
 .|d
 .rm |d
-.nr $d 1 1
-.ds # [1]\k#
+.nr $d 1
+.ds # \\*(_#
 ..
 .
 .
@@ -2059,8 +2057,9 @@
 .nr $c 1                       \" current column number
 .nr $f 1 1                     \" footnote number
 .ds * \*{1\*}\k*\"             \" footnote "name"
-.nr $d 1 1                     \" delayed text number
-.ds # [1]\k#\"                 \" delayed text "name"
+.nr $d 1                       \" delayed text number
+.ds _# [\\n($d]\"
+.ds # \*(_#\"                  \" delayed text "name"
 .nr _M 1                       \" chapter mode is chapter
 .ds lq \(lq\"                  \" left quote
 .ds rq \(rq\"                  \" right quote



reply via email to

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