gbranden pushed a commit to branch master
in repository groff.

commit 28c2632996465b7e6cf8d526175ac8095698e387
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Oct 16 03:42:39 2023 -0500

    tmac/refer.tmac: Fix Savannah #64779.
    
    * tmac/refer.tmac (ref*add-J, ref*add-D, ref*add-E, ref*add-G)
      (ref*add-B, ref*add-O, ref*add-A, ref*add-V, ref*add-N, ref*add-dflt):
      Fix thinko in `ie` predicates.  The true branches of the conditionals
      were never taken because the condition was consistently misspelled,
      testing for the existence of, for example, a register named
      "ef*spec!J:\\$1" (where `\\$1` _would_ be interpolated, but not
      improve chances of success).  Fix by using the `d` conditional
      operator as obviously intended.  This enables some refer(1) formatting
      customization that was unfortunately inoperative.  Problem appears to
      date back to commit 3bab8e6fe5, 2011-01-28.
    
    Fixes <https://savannah.gnu.org/bugs/?64779>.  Thanks to an anonymous
    bug submitter for the report and the patch.
---
 ChangeLog       | 17 +++++++++++++++++
 tmac/refer.tmac | 20 ++++++++++----------
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index efdb027f5..5d1e4105d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2023-10-16  G. Branden Robinson <[email protected]>
+
+       * tmac/refer.tmac (ref*add-J, ref*add-D, ref*add-E, ref*add-G)
+       (ref*add-B, ref*add-O, ref*add-A, ref*add-V, ref*add-N)
+       (ref*add-dflt): Fix thinko in `ie` predicates.  The true
+       branches of the conditionals were never taken because the
+       condition was consistently misspelled, testing for the existence
+       of, for example, a register named "ef*spec!J:\\$1" (where `\\$1`
+       _would_ be interpolated, but not improve chances of success).
+       Fix by using the `d` conditional operator as obviously intended.
+       This enables some refer(1) formatting customization that was
+       unfortunately inoperative.  Problem appears to date back to
+       commit 3bab8e6fe5, 2011-01-28.
+
+       Fixes <https://savannah.gnu.org/bugs/?64779>.  Thanks to an
+       anonymous bug submitter for the report and the patch.
+
 2023-10-13  G. Branden Robinson <[email protected]>
 
        * tmac/mdoc/doc-ditroff (doc-Ev-font):
diff --git a/tmac/refer.tmac b/tmac/refer.tmac
index a5df6daee..8ca2f1635 100644
--- a/tmac/refer.tmac
+++ b/tmac/refer.tmac
@@ -248,42 +248,42 @@
 ..
 .
 .de ref*add-J
-.      ie ref*spec!J:\\$1 \
+.      ie d ref*spec!J:\\$1 \
 .              ref*field J \\*[ref*spec!J:\\$1]
 .      el \
 .              ref*field J \\*[ref*spec!J]
 ..
 .
 .de ref*add-D
-.      ie ref*spec!D:\\$1 \
+.      ie d ref*spec!D:\\$1 \
 .              ref*field D \\*[ref*spec!D:\\$1]
 .      el \
 .              ref*field D \\*[ref*spec!D]
 ..
 .
 .de ref*add-E
-.      ie ref*spec!E:\\$1 \
+.      ie d ref*spec!E:\\$1 \
 .              ref*field E \\*[ref*spec!E:\\$1]
 .      el \
 .              ref*field E \\*[ref*spec!E]
 ..
 .
 .de ref*add-G
-.      ie ref*spec!G:\\$1 \
+.      ie d ref*spec!G:\\$1 \
 .              ref*field G \\*[ref*spec!G:\\$1]
 .      el \
 .              ref*field G \\*[ref*spec!G]
 ..
 .
 .de ref*add-B
-.      ie ref*spec!B:\\$1 \
+.      ie d ref*spec!B:\\$1 \
 .              ref*field B \\*[ref*spec!B:\\$1]
 .      el \
 .              ref*field B \\*[ref*spec!B]
 ..
 .
 .de ref*add-O
-.      ie ref*spec!O:\\$1 \
+.      ie d ref*spec!O:\\$1 \
 .              ref*field O \\*[ref*spec!O:\\$1]
 .      el \
 .              ref*field O \\*[ref*spec!O]
@@ -295,7 +295,7 @@
 ..
 .
 .de ref*add-A
-.      ie ref*spec!A:\\$1 \
+.      ie d ref*spec!A:\\$1 \
 .              ref*field A \\*[ref*spec!A:\\$1]
 .      el \
 .              ref*field A \\*[ref*spec!A]
@@ -304,21 +304,21 @@
 ..
 .
 .de ref*add-V
-.      ie ref*spec!V:\\$1 \
+.      ie d ref*spec!V:\\$1 \
 .              ref*field V \\*[ref*spec!V:\\$1]
 .      el \
 .              ref*field V \\*[ref*spec!V]
 ..
 .
 .de ref*add-N
-.      ie ref*spec!N:\\$1 \
+.      ie d ref*spec!N:\\$1 \
 .              ref*field N \\*[ref*spec!N:\\$1]
 .      el \
 .              ref*field N \\*[ref*spec!N]
 ..
 .
 .de ref*add-dflt
-.      ie ref*spec!dflt:\\$2 \
+.      ie d ref*spec!dflt:\\$2 \
 .              ref*field \\$1 \\*[ref*spec!dflt:\\$2]
 .      el \
 .              ref*field \\$1 \\*[ref*spec!dflt]

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

Reply via email to