gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 104683c5a7998733962e8d0300af41b4f5a78a37 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu May 25 08:46:45 2023 -0500
[mm]: Accept a second argument to `HU`. * contrib/mm/m.tmac (HU): Pass `H` all of our arguments. Also validate quantity of arguments and throw error if called with none. Fixes <https://savannah.gnu.org/bugs/?64204>. --- NEWS | 4 ++++ contrib/mm/ChangeLog | 9 +++++++++ contrib/mm/groff_mm.7.man | 16 +++++++++++----- contrib/mm/m.tmac | 3 ++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 551c175b1..a1aabf361 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ VERSION next Macro packages -------------- +o The m (mm) macro package's `HU` macro now supports a second argument + as a GNU extension. It corresponds to the optional third argument of + the `H` macro. + 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. diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog index 7e66855ce..140d7c9b9 100644 --- a/contrib/mm/ChangeLog +++ b/contrib/mm/ChangeLog @@ -1,3 +1,12 @@ +2023-05-25 G. Branden Robinson <g.branden.robin...@gmail.com> + + Accept a second argument to `HU`. + + * m.tmac (HU): Pass `H` all of our arguments. Also validate + quantity of arguments and throw error if called with none. + + Fixes <https://savannah.gnu.org/bugs/?64204>. + 2023-05-25 G. Branden Robinson <g.branden.robin...@gmail.com> Slightly revise index output. diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man index 4f9419150..024166e0a 100644 --- a/contrib/mm/groff_mm.7.man +++ b/contrib/mm/groff_mm.7.man @@ -2088,12 +2088,18 @@ An explicitly empty argument also indicates the default. . . .TP -.BI HU\~ heading-text -Set an unnumbered section heading. +.BI HU\~ title \~\c +.RI [ suffix ] +Set an unnumbered section heading with +.I title +and, +as a GNU extension, +an optional +.I suffix. . -Except for a heading number, -it is treated as a numbered heading of the level stored in -.RB register\~ Hu ; +The heading is treated as a numbered heading of the level stored in +.RB register\~ Hu , +but no heading number is output; .RB see\~ H . . . diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac index 04d79e230..b593c8f22 100644 --- a/contrib/mm/m.tmac +++ b/contrib/mm/m.tmac @@ -1033,7 +1033,8 @@ numeric; got '\\$1' .ds \\$1 \\$[\\n[hd*sp-tmp]] .. .de HU -.H 0 "\\$1" +.if \\n[.$]=0 .@error \\$0: expected 1 or 2 arguments, got \\n[.$] +.H 0 \\$@ .. .\"------------- .de H _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit