groff-commit
[Top][All Lists]
Advanced

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

[groff] 13/21: [mdoc]: Fix Savannah #63377.


From: G. Branden Robinson
Subject: [groff] 13/21: [mdoc]: Fix Savannah #63377.
Date: Fri, 18 Nov 2022 13:47:53 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit d4227cea5c101da766bd835303465a683935be80
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Nov 17 18:37:37 2022 -0600

    [mdoc]: Fix Savannah #63377.
    
    * tmac/doc.tmac (Nm): Properly leverage new `doc-in-name-section`
      variable.  Set page topic `doc-topic-name` to the first encountered
      argumentful `Nm` call in the "Name" section while handling other
      "Name" section concerns, instead of later after deciding we're not in
      the "Synopsis" section.  Problem caused by me when fixing antediluvian
      mdoc bug in commit 0d85615c62, 5 November.
    
    Fixes <https://savannah.gnu.org/bugs/?63380>.  Thanks to John Gardner
    for the report.
---
 ChangeLog     | 15 +++++++++++++++
 tmac/doc.tmac |  7 ++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8232b2e1d..ac2ad201a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2022-11-17  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [mdoc]: Fix Savannah #63377.
+
+       * tmac/doc.tmac (Nm): Properly leverage new
+       `doc-in-name-section` variable.  Set page topic `doc-topic-name`
+       to the first encountered argumentful `Nm` call in the "Name"
+       section while handling other "Name" section concerns, instead of
+       later after deciding we're not in the "Synopsis" section.
+       Problem caused by me when fixing antediluvian mdoc bug in commit
+       0d85615c62, 5 November.
+
+       Fixes <https://savannah.gnu.org/bugs/?63380>.  Thanks to John
+       Gardner for the report.
+
 2022-11-17  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [mdoc]: Add tests for `Nm` macro.
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index f126731ce..c72b7d22b 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -1041,8 +1041,11 @@
 .    ds doc-macro-name Nm
 .    ie \n[.$] \{\
 .      \" Handle '.Nm ...' in "Name" section: don't use a special font.
-.      ie \n[doc-in-name-section] \
+.      ie \n[doc-in-name-section] \{\
+.        ie "\*[doc-topic-name]"" \
+.          ds doc-topic-name "\$1\"
 .        No \$@
+.      \}
 .      el \
 .        doc-parse-args \$@
 .    \}
@@ -1101,8 +1104,6 @@
 .          \}
 .          ti -\n[doc-indent-synopsis]u
 .      \}\}
-.      if "\*[doc-topic-name]"" \
-.        ds doc-topic-name "\*[doc-arg\n[doc-arg-ptr]]
 .
 .      nop \*[doc-Nm-font]\c
 .    \}



reply via email to

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