URL: <https://savannah.gnu.org/bugs/?67260>
Summary: [PATCH] tmac/an.tmac: macro OP: add a case for an empty first argument Group: GNU roff Submitter: bjarniig Submitted: Sat 28 Jun 2025 11:30:38 PM GMT Category: Macro package - others/general Severity: 3 - Normal Item Group: Feature change Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Sat 28 Jun 2025 11:30:38 PM GMT By: Bjarni Ingi Gislason <bjarniig> Subject: [PATCH] tmac/an.tmac: macro OP: add a case for an empty first argument The usage of OP (meaning "optional", thus using square brackets, typeset in roman (upright)) is <bold>$1 <roman>[<italic>$2<roman>] The macro 'OP' is used in the man page "adduser.local(8)" and others in the package "adduser". Patch is also in the attachment. Signed-off-by: Bjarni Ingi Gislason <bjarn...@simnet.is> --- tmac/an.tmac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tmac/an.tmac b/tmac/an.tmac index 42d8d7a03..732c0256d 100644 --- a/tmac/an.tmac +++ b/tmac/an.tmac @@ -1039,8 +1039,14 @@ contains unsupported escape sequence . nop \\*[an-deprecation-warn]\\ . if ((\\n[.$] < 1) : (\\n[.$] > 2)) \ . an-style-warn .\\$0 expects 1 or 2 arguments, got \\n[.$] -. ie (\\n[.$] > 1) \ -. RI [\\f[B]\\$1\f[] \~\\$2 ] +. ie (\\n[.$] > 1) \{\ +. ie '\\$1'' \{\ +. RI [ \\$2 ] +. \} +. el \{\ +. RI [\\f[B]\\$1\f[] \~\\$2 ] +. \} +. \} . el \ . RB [ \\$1 ] .. -- 2.47.2 _______________________________________________________ File Attachments: ------------------------------------------------------- Name: 0001-tmac-an.tmac-macro-OP-add-a-case-for-an-empty-first-ar.txt Size: 1KiB <https://file.savannah.gnu.org/file/0001-tmac-an.tmac-macro-OP-add-a-case-for-an-empty-first-ar.txt?file_id=57344> AGPL NOTICE These attachments are served by Savane. You can download the corresponding source code of Savane at https://savannah.gnu.org/source/savane-ef91de49e2976f6d280ab934c829bfe625128396.tar.gz _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?67260> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature