groff-commit
[Top][All Lists]
Advanced

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

[groff] 07/13: tmac/an.tmac: Fix latent `ie` logic error.


From: G. Branden Robinson
Subject: [groff] 07/13: tmac/an.tmac: Fix latent `ie` logic error.
Date: Mon, 25 Dec 2023 20:38:50 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit d75e2b0cc0d07f2067a06df4ed3c6cfa555678ac
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Dec 23 12:31:31 2023 -0600

    tmac/an.tmac: Fix latent `ie` logic error.
    
    * tmac/an.tmac (EE): Fix latent logic error; use `if` for conditional
      without an "else".  Since there was no subsequent `el` request, but
      the formatter was "primed" to expect one, this could conceal an `el`
      usage error in a man page document or otherwise behave strangely.
    
    Also annotate unusual indentation when nesting `ie`/`el` structures.
---
 ChangeLog    | 8 ++++++++
 tmac/an.tmac | 4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 6b72436fc..22b1c36f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-12-23  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (EE): Fix latent logic error; use `if` for
+       conditional without an "else".  Since there was no subsequent
+       `el` request, but the formatter was "primed" to expect one,
+       this could conceal an `el` usage error in a man page document or
+       otherwise behave strangely.
+
 2023-12-18  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [troff]: Trivially refactor.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 4ecc60e82..e49a24965 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1039,6 +1039,8 @@ contains unsupported escape sequence
 .  \" If using the DVI output device, we have no constant-width fonts of
 .  \" bold weight and, relatedly, no constant-width family (because that
 .  \" requires all four styles).  Remap the bold styles to normal ones.
+.  \"
+.  \" Use the "switch/case" style of nested `ie`/`el` requests.
 .        ie '\*[.T]'dvi' \{\
 .    ftr R CW
 .    ftr B CW
@@ -1068,7 +1070,7 @@ contains unsupported escape sequence
 .    return
 .  \}
 .  \" Undo the remappings from `EX`.
-.  ie \\n[an*unmap-fonts] \{\
+.  if \\n[an*unmap-fonts] \{\
 .    ftr R
 .    ftr B
 .    ftr I



reply via email to

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