[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 33/45: [ms]: Don't add leaders that don't lead anywhere.
From: |
G. Branden Robinson |
Subject: |
[groff] 33/45: [ms]: Don't add leaders that don't lead anywhere. |
Date: |
Thu, 20 Jan 2022 10:17:54 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 3439bd41966d8c4d970f3ce777279f298a5f9504
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jan 19 19:53:17 2022 +1100
[ms]: Don't add leaders that don't lead anywhere.
* tmac/s.tmac (toc*end-entry): If no page number string `toc*num` is
defined, don't interpolate its emptiness prefixed with a leader (and
tab). This makes "no" as the first argument to `XS` and `XA` work as
documented, suppressing not only the page number but the leader after
the entry.
Fixes <https://savannah.gnu.org/bugs/?61853>.
---
ChangeLog | 12 ++++++++++++
tmac/s.tmac | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 11bcfb9e..575179e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-01-19 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [ms]: Don't add leaders that don't lead anywhere.
+
+ * tmac/s.tmac (toc*end-entry): If no page number string
+ `toc*num` is defined, don't interpolate its emptiness prefixed
+ with a leader (and tab). This makes "no" as the first argument
+ to `XS` and `XA` work as documented, suppressing not only the
+ page number but the leader after the entry.
+
+ Fixes <https://savannah.gnu.org/bugs/?61853>.
+
2022-01-19 G. Branden Robinson <g.branden.robinson@gmail.com>
[ms]: Add regression test for Savannah #61853.
diff --git a/tmac/s.tmac b/tmac/s.tmac
index d7bd116e..7f146a6c 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1802,7 +1802,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
\&\\$*
..
.de toc*end-entry
-\\a\\t\\*[toc*num]
+.if !'\\*[toc*num]'' \\a\\t\\*[toc*num]
.br
.rm toc*num
..
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 33/45: [ms]: Don't add leaders that don't lead anywhere.,
G. Branden Robinson <=