groff-commit
[Top][All Lists]
Advanced

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

[groff] 18/30: [mm]: Handle `LB`'s fifth argument more flexibly.


From: G. Branden Robinson
Subject: [groff] 18/30: [mm]: Handle `LB`'s fifth argument more flexibly.
Date: Thu, 10 Oct 2024 20:18:12 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 2bf1289377c4da4ba3b16bb91312321a640c336d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Oct 9 23:45:28 2024 -0500

    [mm]: Handle `LB`'s fifth argument more flexibly.
    
    * contrib/mm/m.tmac (LB): Accept a dummy character escape sequence as a
      synonym for an empty fifth argument.
    
    * contrib/mm/groff_mm.7.man (Macros) <LB>: Document this.
    
    This is to save the user from the tedium of figuring out how to escape
    or quote an empty pair of double quotes as a macro argument in case they
    indirectly assign to the (forthcoming) string that parameterizes the
    reference list format.  The need for this is a knock-on effect of Bell's
    antipathy for strong type systems.  Possibly the attitude is reflected
    in a contemporaneous satire on advertising.
    
    "Hey, hey, hey!  Calm down, you two--New Shimmer is both a floor wax
    _and_ a dessert topping!" -- _Saturday Night Live_, 1976-01-10
    
    (Holmdel was getting up to mm mischief at about this time.)
---
 contrib/mm/ChangeLog      | 7 +++++++
 contrib/mm/groff_mm.7.man | 4 +++-
 contrib/mm/m.tmac         | 3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index b39568d01..7e319d363 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-09  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m.tmac (LB): Accept a dummy character escape sequence as a
+       synonym for an empty fifth argument.
+
+       * groff_mm.7.man (Macros) <LB>: Document this.
+
 2024-10-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * m.tmac (LB): Validate fifth (mark-or-format) argument.
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index c66956543..84b5d92e4 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2492,7 +2492,9 @@ assumes that the marks are not numeric.
 .
 If
 .I mark-or-format
-is unspecified,
+is empty
+(or the dummy character
+.RB \[lq] \[rs]& \[rq])
 .I mm
 sets items with a hanging indent;
 otherwise,
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 896444b73..500760a5e 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2353,6 +2353,8 @@ breaking page
 .\" assign format
 .af li*cnt!\\n[li*lvl] 1
 .if \\n[li*type] \{\
+.      ie '\?\\*[li*mf]\?'\?\&\?' .af li*cnt!\\n[li*lvl] 0
+.      el \{\
 .              nr li*is-format-valid 0
 .              if \B'\\*[li*mf]'&\\*[li*mf]>-1 .nr li*is-format-valid 1
 .              if '\?\\*[li*mf]\?'\?a\?'       .nr li*is-format-valid 1
@@ -2365,6 +2367,7 @@ but mark argument '\\*[li*mf]' is not a valid register 
format; \
 assuming '0'
 .                      ds li*mf 0\"
 .              \}
+.      \}
 .\}
 .\"
 .if \\n[li*lb-spc] .SP (u;\\n[li*lb-spc]*\\n[Lsp])



reply via email to

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