gbranden pushed a commit to branch master
in repository groff.

commit 37b4180a27a6eeaea429e40ec278abefcda7f3a7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Oct 11 17:49:08 2020 +1100

    tmac/andoc.tmac: Fix Savannah #59106.
    
    * tmac/andoc.tmac: When switching between macro packages in
      andoc and using continuous-rendering mode, flush any partially
      collected output line and write page footer.
    
      (reload-doc): Call an-end if it is defined.
    
      (reload-man): Call doc-end-macro if it is defined.
    
    Fixes <https://savannah.gnu.org/bugs/index.php?59106>.
---
 ChangeLog       |  7 +++++++
 tmac/andoc.tmac | 10 ++++++++++
 2 files changed, 17 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index aa12efa..ca2bd48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,16 @@
 2020-10-11  G. Branden Robinson <[email protected]>
 
+       * tmac/andoc.tmac: When switching between macro packages in
+       andoc and using continuous-rendering mode, flush any partially
+       collected output line and write page footer.
+       (reload-doc): Call an-end if it is defined.
+       (reload-man): Call doc-end-macro if it is defined.
        * tmac/tests/andoc-flush-between-packages.sh: Add regression
        test.
        * tmac/tmac.am (tmac_TESTS): Run test.
 
+       Fixes <https://savannah.gnu.org/bugs/index.php?59106>.
+
 2020-10-11  G. Branden Robinson <[email protected]>
 
        * tmac/andoc.tmac: Remove traps set by mdoc package by the names
diff --git a/tmac/andoc.tmac b/tmac/andoc.tmac
index 7606c13..9625d4e 100644
--- a/tmac/andoc.tmac
+++ b/tmac/andoc.tmac
@@ -47,6 +47,11 @@
 .
 .
 .de reload-doc
+.  \" Flush any partially collected output line and write page footer in
+.  \" continuous rendering mode.
+.  do if d an-end \
+.    do an-end
+.
 .  do ch an-header   \" remove trap set by an-old.tmac
 .  do ch an-footer   \" remove trap set by an-old.tmac
 .  do ch an-p-footer \" remove trap set by an-old.tmac
@@ -66,6 +71,11 @@
 .de reload-man
 .  do cp \n(.C       \" restore original compatibility mode
 .
+.  \" Flush any partially collected output line and write page footer in
+.  \" continuous rendering mode.
+.  do if d doc-end-macro \
+.    do doc-end-macro
+.
 .  do ch doc-header  \" remove trap set by mdoc/doc-{n,dit}roff
 .  do ch doc-footer  \" remove trap set by mdoc/doc-{n,dit}roff
 .

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to