gbranden pushed a commit to branch master
in repository groff.
commit 96c354d7cadbc30a271206fb6c2b257c448d218b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jul 3 00:51:49 2024 -0500
[mm]: Alter semantics of `LI`'s second argument.
* contrib/mm/m.tmac (LI): Interpret a second argument not just as
indicating that the specified mark should be applied as a prefix, but
as a Boolean indicating whether to put space between the prefix and
the mark. Thus, where formerly one would use "2" as the second
argument to eliminate the space, one would now use "0". We continue
to recognize "2" specially, but throw a warning in anticipation of
future removal of this handling.
I contemplate removing the `Limsp` register; even under old `LI`
semantics you had to always type some kind of second argument to get
this macro's first argument treated as a prefix. (This aspect is a DWB
3.3 mm feature. Idiomatically, one would just put "1" here as with
numerous other mm macros, but the package would not consistently test
for that exact value; any old non-empty string would do.) Having a
default prefix padding selector seems pointless; it saves no typing.
Further, making this change to `LI` enables us to treat the second
argument as a measurement in the future if desired--e.g., "I want 5 ens
of padding between the prefix and the mark", analogously to the way the
`LB` macro's third argument configures an arbitrary amount of padding
_after_ the mark and before the list item text.
---
NEWS | 9 +++++++++
contrib/mm/ChangeLog | 10 ++++++++++
contrib/mm/groff_mm.7.man | 17 ++++-------------
3 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/NEWS b/NEWS
index 4d5cf31d2..f9e7db006 100644
--- a/NEWS
+++ b/NEWS
@@ -348,6 +348,15 @@ o The m (mm) macro package's `IND` macro (a GNU
extension), now calls
`SK` only if no `TXIND` macro is defined, instead of performing this
action as part of the fallback when no `TYIND` macro is defined.
+o The m (mm) macro package's `LI` macro now interprets its second
+ argument (a GNU extension) as a Boolean indicating whether a space
+ should separate the list item mark from its prefix (the first
+ argument). Thus, where you formerly specified "2" to indicate no
+ such separation, you would now use "0", matching the semantics of the
+ `Limsp` register (which configures a default prefix/mark separation
+ policy). "2" continues to be recognized and handled as before, but
+ prompts a warning; migrate your documents.
+
o The m (mm) macro package now supports the `E` register as DWB mm did.
o The m (mm) macro package now supports AT&T/DWB mm's `Rg` string.
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index e1399fcd4..a64c307fd 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,13 @@
+2024-07-03 G. Branden Robinson <[email protected]>
+
+ * m.tmac (LI): Interpret a second argument not just as
+ indicating that the specified mark should be applied as a
+ prefix, but as a Boolean indicating whether to put space between
+ the prefix and the mark. Thus, where formerly one would use "2"
+ as the second argument to eliminate the space, one would now use
+ "0". We continue to recognize "2" specially, but throw a
+ warning in anticipation of future removal of this handling.
+
2024-07-03 G. Branden Robinson <[email protected]>
* m.tmac (LI): Refactor logic that constructs the item mark, its
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index fb7788fb3..d78c643f3 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2531,7 +2531,7 @@ to follow the list.
.
.TP
.BR LI \~[\c
-.IR mark \~[ item-mark-mode ]]
+.IR mark \~[ pad-prefix ]]
Begin a list item.
.
.I mm
@@ -2559,18 +2559,9 @@ warns and uses one en of padding.
A second argument
prefixes
.I mark
-to the configured mark;
-an
-.I item-mark-mode
-value
-.RB of\~ 1
-places an unbreakable space after
-.I mark,
-while
-a value
-.RB of \~2
-does not
-(rendering the two adjacent).
+to the configured mark
+and conditionally puts an unbreakable space between the prefix and mark
+per the argument's Boolean value.
.
See register
.BR Limsp .
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit