groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 07/38: [mdoc]: Fix Savannah #65480 (`Nm` reset).


From: G. Branden Robinson
Subject: [groff] 07/38: [mdoc]: Fix Savannah #65480 (`Nm` reset).
Date: Sun, 24 Mar 2024 16:59:56 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7a6fb7f81834365b39da76e4877d742056c66d4a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Mar 18 12:18:47 2024 -0500

    [mdoc]: Fix Savannah #65480 (`Nm` reset).
    
    * tmac/mdoc/doc-common (doc-reset-titles): New macro pulls several
      string assignment operations to here...
      (doc-end-macro): ...from here, because they're needed more generally.
      (Dd): Call the new macro unconditionally.
    
    Fixes <https://savannah.gnu.org/bugs/?65480>.  Problem introduced by me
    in the 1.23.0 development cycle; I didn't bother to bisect it down to an
    individual commit because I know I churned parts of the macro package
    pretty vigorously to get batch rendering of mixed man(7) and mdoc(7)
    documents working correctly.  (And as we can see, I didn't _quite_
    succeed.)
---
 ChangeLog            | 15 +++++++++++++++
 tmac/mdoc/doc-common | 26 ++++++++++++++++++--------
 2 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a6ae085e9..d0e1ac6c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2024-03-18  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/mdoc/doc-common (doc-reset-titles): New macro pulls
+       several string assignment operations to here...
+       (doc-end-macro): ...from here, because they're needed more
+       generally.
+       (Dd): Call the new macro unconditionally.
+
+       Fixes <https://savannah.gnu.org/bugs/?65480>.  Problem
+       introduced by me in the 1.23.0 development cycle; I didn't
+       bother to bisect it down to an individual commit because I know
+       I churned parts of the macro package pretty vigorously to get
+       batch rendering of mixed man(7) and mdoc(7) documents working
+       correctly.  (And as we can see, I didn't _quite_ succeed.)
+
 2024-03-18  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [mdoc]: Regression-test Savannah #65480.
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 502e596a6..878a0282b 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -325,6 +325,8 @@
 .  \}
 .  if \n[C] .rr P
 .
+.  doc-reset-titles
+.
 .  if !\n[.$] \
 .    doc-warn .Dd directive expects an argument
 .  if \n[.$] \{\
@@ -1134,6 +1136,22 @@
 .ec
 .
 .
+.\" NS doc-reset-titles macro
+.\" NS   prepare for a new mdoc(7) document
+.
+.eo
+.de doc-reset-titles
+.  \" Reset strings to reduce info leaks from one man page to the next.
+.  ds doc-date-string UNDATED\"
+.  ds doc-page-topic UNTITLED\"
+.  ds doc-volume LOCAL\"
+.  ds doc-section \" empty
+.  ds doc-operating-system \" empty
+.  ds doc-topic-name \" empty
+..
+.ec
+.
+.
 .\" NS doc-end-macro macro
 .\" NS   finish output
 .\" NS
@@ -1170,14 +1188,6 @@
 .  \}
 .  ch doc-header
 .  doc-break-page-with-new-number
-.
-.  \" Reset strings to reduce info leaks from one man page to the next.
-.  ds doc-date-string UNDATED\"
-.  ds doc-page-topic UNTITLED\"
-.  ds doc-volume LOCAL\"
-.  ds doc-section \" empty
-.  ds doc-operating-system \" empty
-.  ds doc-topic-name \" empty
 ..
 .ec
 .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]