Follow-up Comment #3, bug #64639 (project groff): [comment #2 comment #2:] > The issue with the input in comment #1 appears to be that _mom_ assumes that a color named "default" exists (for me, it certainly defines a string _named_ `default` with the _contents_ `default`).
cat <<EOF | groff -z -mom .tm \*[default] EOF =>black \*[default] should return "black" unless you accidentally double-escaped it. > What puzzles me more is the `COLOR` macro itself. > > The following patch seems to make it do what it is documented to do. > diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac > index b0fd1ef55..039bcfe48 100644 > --- a/contrib/mom/om.tmac > +++ b/contrib/mom/om.tmac > @@ -1873,9 +1873,9 @@ end > .MAC COLOR END > . ie \\n[.u]=1 \{\ > \c > -\\*[\\$1]\c > +\m[\\*[\\$1]]\c > . \} > -. el \\*[\\$1] > +. el \m[\\*[\\$1]] > .END > \# > \# NEWCOLOR Colours in mom have to be "initialized" with NEWCOLOR or XCOLOR. Either of these creates a string of the form "\m[color]" allowing the user to change colour with the string "\*[color]". Because "\\*[\\$1]" expands to "\m[color]" (arg1 is a pre-initialize color name), the patch expands to "\m[\m[color]]", which is incorrect. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64639> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/