gbranden pushed a commit to branch master
in repository groff.

commit fc3374792d78c2c1fbdc43255f3efd845fa4536b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu May 9 18:33:11 2024 -0500

    [mdoc]: Fix Savannah #65717.
    
    * tmac/doc.tmac (doc-empty-line):
    * tmac/mdoc/doc-common (doc-header, doc-break-body-text, doc-footer)
      (doc-end-macro): Define macros with `de1` instead of `de` so the macro
      package doesn't throw warnings when used in compatibility mode.
    
    Fixes <https://savannah.gnu.org/bugs/?65717>.  Thanks to Bjarni Ingi
    Gislason for the report.
---
 ChangeLog            | 11 +++++++++++
 tmac/doc.tmac        |  6 +++++-
 tmac/mdoc/doc-common | 14 +++++++++-----
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 35bf4e27c..05198be40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-05-09  G. Branden Robinson <[email protected]>
+
+       * tmac/doc.tmac (doc-empty-line):
+       * tmac/mdoc/doc-common (doc-header, doc-break-body-text)
+       (doc-footer, doc-end-macro): Define macros with `de1` instead of
+       `de` so the macro package doesn't throw warnings when used in
+       compatibility mode.
+
+       Fixes <https://savannah.gnu.org/bugs/?65717>.  Thanks to Bjarni
+       Ingi Gislason for the report.
+
 2024-05-08  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (environment::get_prev_char)
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 11fc989c3..708e75da2 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -54,6 +54,10 @@
 .
 .cp 0
 .
+.\" Macros that are part of the external interface (Dd, Sh, Pp, etc.) or
+.\" that are called by traps of any kind must be defined with `de1`
+.\" because they might be called from a context where compatibility mode
+.\" is enabled.  For other macros, `de` suffices.
 .
 .\" Define a string for use in diagnostic messages.
 .ds doc doc.tmac\"
@@ -7188,7 +7192,7 @@ should this have been '.Em ...'?
 .\" NS   emit warning and print empty line
 .
 .eo
-.de doc-empty-line
+.de1 doc-empty-line
 .  if !\n[doc-display-depth] \
 .    doc-warn empty input line
 .  sp
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index cb6af42e5..1ade688ac 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -210,8 +210,12 @@
 .nr doc-punct? 3
 .nr doc-punct! 3
 .
+.\" Macros that are part of the external interface (Dd, Sh, Pp, etc.) or
+.\" that are called by traps of any kind must be defined with `de1`
+.\" because they might be called from a context where compatibility mode
+.\" is enabled.  For other macros, `de` suffices.
 .
-.\" Define alternate requests to handle continuous rendering.
+.\" Define replacements for requests to handle continuous rendering.
 .\"
 .\" This .ne replacement avoids page breaks; instead, the page length is
 .\" increased to the necessary amount (this is needed for tables).
@@ -1027,7 +1031,7 @@
 .\" NS   doc-hs-len-prev
 .
 .eo
-.de doc-header
+.de1 doc-header
 .  ds doc-xref \*[doc-page-identifier-font]\*[doc-page-identifier]\f[]\"
 .  as doc-xref \*[doc-page-section-font](\*[doc-section])\f[]\"
 .  ds doc-abbv \*[doc-page-identifier]\"
@@ -1070,7 +1074,7 @@
 .\" NS doc-break-body-text
 .\" NS   Schedule a page break when the next output line is written (not
 .\" NS   called if continuously rendering).
-.de doc-break-body-text
+.de1 doc-break-body-text
 '  bp
 ..
 .
@@ -1083,7 +1087,7 @@
 .\" NS   doc-page-id
 .
 .eo
-.de doc-footer
+.de1 doc-footer
 .  ds doc-xref \*[doc-page-identifier-font]\*[doc-page-identifier]\f[]\"
 .  as doc-xref \*[doc-page-section-font](\*[doc-section])\f[]\"
 .  ds doc-page-id \n[%]
@@ -1159,7 +1163,7 @@
 .\" NS   doc-end-previous-document
 .
 .eo
-.de doc-end-macro
+.de1 doc-end-macro
 .  doc-check-depth
 .
 .  if \n[cR] \{\

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

Reply via email to