gbranden pushed a commit to branch master
in repository groff.

commit c1876a39c40e7d39ca09d0d103ba3ffdaee2eaf7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Nov 14 12:26:24 2025 -0600

    [troff]: Withdraw "right-brace" warning category.
    
    * src/roff/troff/troff.h (enum warning_type): Drop `WARN_RIGHT_BRACE`
      enumeration constant.
    
    * src/roff/troff/input.cpp: Drop "right-brace" element from
      `warning_table` static array.
    
    * doc/groff.texi.in (Warnings):
    * src/roff/troff/troff.1.man (Warnings): De-document it.
    
    * NEWS: Report change.
    
    Fixes <https://savannah.gnu.org/bugs/?67698> (2/2).
---
 ChangeLog                  | 16 ++++++++++++++++
 NEWS                       |  7 +++++++
 doc/groff.texi.in          | 10 +++++-----
 src/roff/troff/input.cpp   |  1 -
 src/roff/troff/troff.1.man | 14 +++++++-------
 src/roff/troff/troff.h     |  2 +-
 6 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ef3632eaf..af56dfbed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2025-11-14  G. Branden Robinson <[email protected]>
+
+       [troff]: Withdraw "right-brace" warning category.
+
+       * src/roff/troff/troff.h (enum warning_type): Drop
+       `WARN_RIGHT_BRACE` enumeration constant.
+       * src/roff/troff/input.cpp: Drop "right-brace" element from
+       `warning_table` static array.
+
+       * doc/groff.texi.in (Warnings):
+       * src/roff/troff/troff.1.man (Warnings): De-document it.
+
+       * NEWS: Report change.
+
+       Fixes <https://savannah.gnu.org/bugs/?67698> (2/2).
+
 2025-11-14  G. Branden Robinson <[email protected]>
 
        [troff]: Withdraw "number" warning category.  The previous
diff --git a/NEWS b/NEWS
index 2d44b73e1..c54d597d3 100644
--- a/NEWS
+++ b/NEWS
@@ -150,6 +150,13 @@ troff
    We recommend using brace escape sequences `\{` and `\}` to ensure
    that your control flow structures remain maintainable.
 
+*  The "right-brace" warning category has been withdrawn.  If enabled
+   (which it was not by default), the formatter would emit a diagnostic
+   in exactly one circumstance: when a numeric expression was expected
+   (as, for instance, the second argument to an `nr` request) but a
+   right brace escape sequence `\}` was encountered instead.  This
+   diagnostic still issues, but it is now an error.
+
 *  GNU troff now performs some limited processing/transformation of the
    argument to the `\X` escape sequence and its counterpart `device`
    request, to address the requirement that some documents have to pass
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 3ecf44724..e5808c8b7 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -19420,11 +19420,11 @@ issues at most one warning for each.
 A tab character was encountered where a number was expected, or appeared
 in an unquoted macro argument.
 
-@item right-brace
-@itemx 4096
-@cindex @code{\@}}, and warnings
-A right brace escape sequence @code{\@}} was encountered where a number
-was expected.
+@c @item right-brace
+@c @itemx 4096
+@c @cindex @code{\@}}, and warnings
+@c A right brace escape sequence @code{\@}} was encountered where a
+@c number was expected.
 
 @item missing
 @itemx 8192
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index f522154d0..339695d2a 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -10255,7 +10255,6 @@ static struct warning_category {
   { "scale", WARN_SCALE },
   { "syntax", WARN_SYNTAX },
   { "tab", WARN_TAB },
-  { "right-brace", WARN_RIGHT_BRACE },
   { "missing", WARN_MISSING },
   { "input", WARN_INPUT },
   { "escape", WARN_ESCAPE },
diff --git a/src/roff/troff/troff.1.man b/src/roff/troff/troff.1.man
index 612040857..875f2338f 100644
--- a/src/roff/troff/troff.1.man
+++ b/src/roff/troff/troff.1.man
@@ -573,7 +573,7 @@ Bit@Code@Category@Bit@Code@Category
 _
 0@1@char@10@1024@reg
 1@2@\fIunused\fP@11@2048@tab
-2@4@break@12@4096@right\-brace
+2@4@break@12@4096@\fIunused\fP
 3@8@delim@13@8192@missing
 4@16@\fIunused\fP@14@16384@input
 5@32@scale@15@32768@escape
@@ -781,12 +781,12 @@ issues at most one warning for each.
 T}
 .
 .
-.sp \n[PD]u
-right\-brace   4096    T{
-A right brace escape sequence
-.B \[rs]}
-was encountered where a number was expected.
-T}
+.\" .sp \n[PD]u
+.\" right\-brace       4096    T{
+.\" A right brace escape sequence
+.\" .B \[rs]}
+.\" was encountered where a number was expected.
+.\" T}
 .
 .
 .sp \n[PD]u
diff --git a/src/roff/troff/troff.h b/src/roff/troff/troff.h
index 93873834e..d4eb1c44b 100644
--- a/src/roff/troff/troff.h
+++ b/src/roff/troff/troff.h
@@ -59,7 +59,7 @@ enum warning_type {
   WARN_MAC = 01000,
   WARN_REG = 02000,
   WARN_TAB = 04000,
-  WARN_RIGHT_BRACE = 010000,
+  //WARN_RIGHT_BRACE = 010000, // withdrawn in groff 1.24
   WARN_MISSING = 020000,
   WARN_INPUT = 040000,
   WARN_ESCAPE = 0100000,

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

Reply via email to