groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/10: [eqn]: Recognize "delim on" even if `-C` given.


From: G. Branden Robinson
Subject: [groff] 02/10: [eqn]: Recognize "delim on" even if `-C` given.
Date: Fri, 5 Aug 2022 03:52:24 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7b9e3181df5069037349b0c6292a66bf0ec6259d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Aug 4 07:44:43 2022 -0500

    [eqn]: Recognize "delim on" even if `-C` given.
    
    * src/preproc/eqn/lex.cpp (do_delim): Recognize "delim on" even in
      compatibility mode, enabling tbl to toggle eqn delimiter recognition
      when it is run in compatibility mode as well.
    * src/preproc/eqn/eqn.1.man (Controlling delimiteres): Update.
    * NEWS: Add item.
    
    Fixes <https://savannah.gnu.org/bugs/?62852>.  Thanks to Bjarni Ingi
    Gislason for the report.
    
    Also update editor aid comments; drop old style Emacs file-local
    variable setting.
---
 ChangeLog                 | 11 +++++++++++
 NEWS                      | 12 ++++++++++++
 src/preproc/eqn/eqn.1.man |  6 +-----
 src/preproc/eqn/lex.cpp   |  8 ++++++--
 4 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c18326948..41210c21a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-08-04  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/preproc/eqn/lex.cpp (do_delim): Recognize "delim on" even
+       in compatibility mode, enabling tbl to toggle eqn delimiter
+       recognition when it is run in compatibility mode as well.
+       * src/preproc/eqn/eqn.1.man (Controlling delimiteres): Update.
+       * NEWS: Add item.
+
+       Fixes <https://savannah.gnu.org/bugs/?62852>.  Thanks to Bjarni
+       Ingi Gislason for the report.
+
 2022-08-03  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/an.tmac (TH): Fix spurious complaint from `CHECKSTYLE`
diff --git a/NEWS b/NEWS
index 7adba61f9..1aaa63b2b 100644
--- a/NEWS
+++ b/NEWS
@@ -103,6 +103,18 @@ groff
 o The -I option now implies -g (run the grn(1) preprocessor), and
   supplies grn an -M option with the argument to -I.
 
+eqn
+---
+
+o The GNU extension
+
+    delim on
+
+  is now recognized even in AT&T compatibility mode (the -C option) in
+  order to reliably integrate with tbl.  Few eqn documents are expected
+  to use 'o' and 'n' as left and right delimiters, respectively.  If
+  yours does, consider swapping them, or select others.
+
 Macro packages
 --------------
 
diff --git a/src/preproc/eqn/eqn.1.man b/src/preproc/eqn/eqn.1.man
index 2baedda86..90b38215c 100644
--- a/src/preproc/eqn/eqn.1.man
+++ b/src/preproc/eqn/eqn.1.man
@@ -216,7 +216,6 @@ or
 .SS "Controlling delimiters"
 .\" ====================================================================
 .
-If not in compatibility mode,
 .I eqn
 recognizes
 .RB \[lq] "delim on" \[rq]
@@ -1318,10 +1317,7 @@ Recognize
 .B .EQ
 and
 .B .EN
-even when followed by a character other than space or newline,
-and do not handle the
-.RB \[lq] "delim on" \[rq]
-statement specially.
+even when followed by a character other than space or newline.
 .
 .
 .TP
diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index 115617b1d..9dc1c0571 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /* Copyright (C) 1989-2020 Free Software Foundation, Inc.
      Written by James Clark (jjc@jclark.com)
 
@@ -1079,7 +1078,7 @@ void do_delim()
       end_delim_saved = end_delim;
       start_delim = end_delim = '\0';
     }
-    else if (c == 'o' && d == 'n' && !compatible_flag) {
+    else if (c == 'o' && d == 'n') {
       start_delim = start_delim_saved;
       end_delim = end_delim_saved;
     }
@@ -1222,3 +1221,8 @@ void yyerror(const char *s)
   show_context();
 }
 
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:



reply via email to

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