[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 39/41: [mm]: Fix Savannah #60657.
From: |
G. Branden Robinson |
Subject: |
[groff] 39/41: [mm]: Fix Savannah #60657. |
Date: |
Sat, 5 Mar 2022 16:06:22 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 1db6dd3435ea0306a763c39383f3b46ade51845b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Mar 6 05:28:00 2022 +1100
[mm]: Fix Savannah #60657.
[refer,mm]: Add and use `ref*reset` macro to clean up between
bibilography entries.
* tmac/refer.tmac (]-): Move string clean up logic from here...
(ref*reset): ...to this new macro. Now we can also use it...
* contrib/mm/refer-mm.tmac (ref*][-first-pass): ...here.
Problem appears to date back to refer-mm.tmac's introduction in January
2011. Thanks to Bjarni Ingi Gislason for the root-cause analysis and
proposed fix, to which I applied the DRY principle and added a reset of
`ref*string` as well.
Fixes <https://savannah.gnu.org/bugs/?60657>.
---
ChangeLog | 17 +++++++++++++++++
contrib/mm/refer-mm.tmac | 1 +
tmac/refer.tmac | 9 +++++++--
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 73cc43ca..9ea3bc38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2022-03-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [refer,mm]: Add and use `ref*reset` macro to clean up between
+ bibilography entries.
+
+ * tmac/refer.tmac (]-): Move string clean up logic from here...
+ (ref*reset): ...to this new macro. Now we can also use it...
+
+ * contrib/mm/refer-mm.tmac (ref*][-first-pass): ...here.
+
+ Problem appears to date back to refer-mm.tmac's introduction in
+ January 2011. Thanks to Bjarni Ingi Gislason for the root-cause
+ analysis and proposed fix, to which I applied the DRY principle
+ and added a reset of `ref*string` as well.
+
+ Fixes <https://savannah.gnu.org/bugs/?60657>.
+
2022-03-06 G. Branden Robinson <g.branden.robinson@gmail.com>
[mm]: Regression-test Savannah #60657.
diff --git a/contrib/mm/refer-mm.tmac b/contrib/mm/refer-mm.tmac
index 69c36e64..800568ab 100644
--- a/contrib/mm/refer-mm.tmac
+++ b/contrib/mm/refer-mm.tmac
@@ -79,6 +79,7 @@
. am ref*mac
. ds [F "\\*([F\"
. ][ "\\$1" "\\$2"
+. ref*reset
\\..
..
.
diff --git a/tmac/refer.tmac b/tmac/refer.tmac
index 62f1c14c..a5df6dae 100644
--- a/tmac/refer.tmac
+++ b/tmac/refer.tmac
@@ -115,8 +115,7 @@
.
.\" start of reference
.de ]-
-. rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V
-. rm ref*string
+. ref*reset
. if d ref*item-start-hook \
. ref*item-start-hook
..
@@ -167,6 +166,12 @@
..
.
.
+.de ref*reset
+. rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V
+. rm ref*string
+..
+.
+.
.de ref*normal-print
. ie d [F \
. ref*text-label-start \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 39/41: [mm]: Fix Savannah #60657.,
G. Branden Robinson <=