gbranden pushed a commit to branch master
in repository groff.
commit 8a423cd26ea49cb3846684f11e640771a62a8f03
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jun 15 06:17:51 2024 -0500
[mm]: Fix Savannah #65865 (suppress P indent).
* contrib/mm/m.tmac (hd*trap): New macro shuts off suppression of
paragraph indentation.
(H): Stop trying to figure out whether we should suppress indentation
based on whether the heading is run-in or not; that is not the
relevant criterion. What matters is whether formatted output (such as
implied paragraph text) follows the heading call. To that end, set a
1-line input trap calling the new macro `hd*trap`.
Fixes <https://savannah.gnu.org/bugs/?65865>. Problem introduced by me
in commit 814e204d16, 24 January 2023.
---
contrib/mm/ChangeLog | 14 ++++++++++++++
contrib/mm/m.tmac | 9 ++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index ea52a71b7..7b3c71020 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,17 @@
+2024-06-15 G. Branden Robinson <[email protected]>
+
+ * m.tmac (hd*trap): New macro shuts off suppression of paragraph
+ indentation.
+ (H): Stop trying to figure out whether we should suppress
+ indentation based on whether the heading is run-in or not; that
+ is not the relevant criterion. What matters is whether
+ formatted output (such as implied paragraph text) follows the
+ heading call. To that end, set a 1-line input trap calling the
+ new macro `hd*trap`.
+
+ Fixes <https://savannah.gnu.org/bugs/?65865>. Problem
+ introduced by me in commit 814e204d16, 24 January 2023.
+
2024-06-15 G. Branden Robinson <[email protected]>
Regression-test Savannah #65884.
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index a84f30d90..f1965d09c 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -1037,6 +1037,10 @@ numeric; got '\\$1'
.H 0 \\$@
..
.\"-------------
+.de hd*trap
+.nr par@suppress-indentation 0
+..
+.\"-------------
.de H
.if !r hd*cur-bline .nr hd*cur-bline \\n[nl]
.br
@@ -1177,10 +1181,7 @@ numeric; got '\\$1'
. if (\\n[Hi]=1)&(\\n[Pt]=1) .ti +\\n[Pi]n
. \" indent size of mark if Hi=2
. if \\n[hd*htype]&(\\n[Hi]>1) .ti +\\n[hd*mark-size]u
-. nr par@suppress-indentation 1
.\}
-.\" We're setting a run-in heading; the next paragraph is normal.
-.el .nr par@suppress-indentation 0
.\"
.\" check if it is time to reset footnotes
.if (\\n[hd*level]=1)&\\n[ft*clear-at-header] .nr ft*nr 0 1
@@ -1198,6 +1199,8 @@ numeric; got '\\$1'
.nr hd*last-hsize \\n[.k]
.\" HTML: end of heading
.misc@tag EO-H
+.\" _Any_ output after this heading resets suppression of indentation.
+.itc 1 hd*trap
..
.\"--------
.de HM
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit