gbranden pushed a commit to branch master
in repository groff.

commit 0260203e979a2dd96e19f6564b1dc4e69e80be16
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 26 12:39:34 2024 -0500

    [tbl]: Make diagnostic message more helpful.
    
    * src/preproc/tbl/table.cpp (table::add_entry): When erroring about a
      table entry ending with (an incomplete) zero-motion escape sequence,
      spell out the escape sequence in the diagnostic for the benefit of
      *roff non-experts.
---
 ChangeLog                 | 7 +++++++
 src/preproc/tbl/table.cpp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8a8eb1ecd..51c2ec77e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-09-26  G. Branden Robinson <[email protected]>
+
+       * src/preproc/tbl/table.cpp (table::add_entry): When erroring
+       about a table entry ending with (an incomplete) zero-motion
+       escape sequence, spell out the escape sequence in the diagnostic
+       for the benefit of *roff non-experts.
+
 2024-09-23  G. Branden Robinson <[email protected]>
 
        * src/roff/nroff/nroff.sh: Support `-v` non-finally in option
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 9452d94f0..ab6eea7ee 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1529,7 +1529,7 @@ void table::add_entry(int r, int c, const string &str,
     string last_two_chars = str.substring((len - 2), 2);
     if ("\\z" == last_two_chars)
       error_with_file_and_line(fn, ln, "table entry ends with"
-                              " zero-motion escape sequence");
+                              " zero-motion escape sequence '\\z'");
   }
   char *s = str.extract();
   if (str.search('\n') >= 0) {

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

Reply via email to